Skip to content

Allow setting the aria-current property using the route and active actions. - #173

Open
david-nordvall wants to merge 2 commits into
mateothegreat:mainfrom
david-nordvall:aria-current
Open

Allow setting the aria-current property using the route and active actions.#173
david-nordvall wants to merge 2 commits into
mateothegreat:mainfrom
david-nordvall:aria-current

Conversation

@david-nordvall

@david-nordvall david-nordvall commented Jun 25, 2026

Copy link
Copy Markdown

While setting CSS classes on anchor elements is useful for creating visual cues, in many cases it is better to use the aria-current property. In addition to be useful in styling and visual changes, it is also an important cue for screen readers.

This PR adds support for setting the aria-current property using the route and active actions. This is done by expanding the RouteOptions type with the member ariaCurrent. Any value in the current state of this member is applied to the anchor element's aria-current property. The RouteOptions member classes is left unchanged. This means that this change does not affect existing users of the library and that CSS classes can be applied using the route and active actions along side applying aria-current values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant