-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(a11y): add aria-current="page"
attribute to links
#20413
fix(a11y): add aria-current="page"
attribute to links
#20413
Conversation
daae92a
to
b1b3285
Compare
b1b3285
to
c2a991e
Compare
href, | ||
linkProps: reactive({ | ||
href, | ||
ariaCurrent: computed(() => isActive.value ? 'page' : undefined), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-current
should use kebab case name, because vue 3 won't concert it automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it depends on the attribute, HTMLElement.ariaCurrent exists so it works but others might not: vuejs/core#5477
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chrome automatically converts attributes, but Firefox doesn't. There is an open issue about it on vuetify and vue repos.
Description
This PR adds an
aria-current="page"
attribute to VBtn, VCard, VChip, VListItem and VBreadcrumbsItem when active value from router istrue
.closes #20399