Use aria-current="page" attribute for <Link> active state #681
morellodev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
At the moment, the library is adding a custom
data-status
attribute to the anchor tag to indicate that it is active. This enable users to target active links for styling purposes, but the accessibility tree is completely unaware of that information.To address this, we could set instead the
aria-current="page"
attribute, which is the recommended way to handle active links in an accessible way.If setting
"page"
as the value of the attribute is out of context for a specific use (eg. for particular nested routes), the user can always override it with the proper value.Beta Was this translation helpful? Give feedback.
All reactions