-
-
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
[Bug Report] Incorrect aria roles assigned to v-list-item #13125
Closed
mattgrande opened this issue
Feb 17, 2021
· 3 comments
· Fixed by #13126, elirehema/nbs-web#87, elirehema/authx#10 or EuanRiggans/ukpetition.info#159
Closed
[Bug Report] Incorrect aria roles assigned to v-list-item #13125
mattgrande opened this issue
Feb 17, 2021
· 3 comments
· Fixed by #13126, elirehema/nbs-web#87, elirehema/authx#10 or EuanRiggans/ukpetition.info#159
Labels
a11y
Accessibility issue
C: VList
C: VListGroup
T: bug
Functionality that does not work as intended/expected
Milestone
Comments
Makes sense, check how this actually behaves in NVDA though. |
Will do; thanks for the prompt response! |
mattgrande
pushed a commit
to mattgrande/vuetify
that referenced
this issue
Feb 17, 2021
A `listitem` should not contain an `aria-selected` attribute, and a `listbox` should only have `option`s as children. See also: * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Listbox_role * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Listitem_role fixes vuetifyjs#13125
8 tasks
KaelWD
pushed a commit
that referenced
this issue
Feb 18, 2021
This was referenced Mar 10, 2021
This was referenced Mar 17, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a11y
Accessibility issue
C: VList
C: VListGroup
T: bug
Functionality that does not work as intended/expected
Environment
Vuetify Version: 2.4.4
Vue Version: 2.6.12
Browsers: Firefox 85.0, Google Chrome
OS: Windows 10
Steps to reproduce
Create a v-list-item within a v-list-item-group
Expected Behavior
The aria-tags are valid
Actual Behavior
The aria-tags are currently incorrect
Reproduction Link
https://codepen.io/mattgrande/pen/qBqmgXo
Other comments
This was discovered while running a lighthouse audit on my site.
Currently, when a
VListItem
is in a group, we attach the role oflistitem
, and setaria-selected
to an appropriate value.Unfortunately, a
listitem
should not usearia-selected
(see here for listitem documentation and here for aria-selected documentation).I think the right call in a situation like this is to use a role of
option
or perhapstreeitem
(and I'm willing to make a PR to that effect), but I wanted to get some sort of agreement before doing so.See here:
vuetify/packages/vuetify/src/components/VList/VListItem.ts
Lines 142 to 143 in 34a37a0
The text was updated successfully, but these errors were encountered: