-
-
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(VSelect/VMenu): remove duplicate IDs, add aria-activedescendant #10226
Conversation
@rkrasnan can you test this fix? zeit isn't behaving so you'll have to checkout the branch, copy my markup to |
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.
Pending verification from NVDA.
This comment has been minimized.
This comment has been minimized.
Hey @KaelWD, TravisBuddy Request Identifier: 7c165250-48f0-11ea-b51a-43bce7cb815c |
Testing with NVDA. v-menu
v-select
|
The issue faced by @rkrasnan not reading the items after the first is due to this playground example generating the same id for every item But |
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.
I'm not sure if the activeTile references can be computed, but they are currently duplicated.
VSelect items are now being read as you navigate through them, but there are some weird issues still. Also if the VSelect is closed and you press arrow to change the item, it just reads "blank" after each keypress. Here's a video: https://www.youtube.com/watch?v=LdFbpNOrE-k Here is the proper implementation details with the elements and aria roles to implement an accessible VSelect. https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-collapsible.html We could follow some of this. The implementation uses a button with the currently selected item as a label inside the button, but I don't know if it works well since VSelect extends VInput. |
9e00958
to
de967ac
Compare
Co-Authored-By: John Leider <john@vuetifyjs.com>
Co-Authored-By: John Leider <john@vuetifyjs.com>
Co-Authored-By: John Leider <john@vuetifyjs.com>
Co-Authored-By: John Leider <john@vuetifyjs.com>
371db44
to
805a707
Compare
Maybe, but I know refs aren't reactive so I can't be bothered
Yeah that'd be nice but maybe for a later time, this is a big improvement already and is ready to go now. |
…uetifyjs#10226) * fix(VSelect): remove duplicate IDs in list fixes vuetifyjs#9680 * feat(VMenu): apply activedescendant with ids on list items * revert: undo changes to v-select * feat(VSelect): add aria-activedescendant * test: update snapshots * fix(VSelect): set correct aria-readonly value broken by vuetifyjs#7385 * fix(VSelect): set activedescendant to list item instead of title * fix(VAutocomplete): set aria-activedescendant * fix(VMenu): prevent TypeError before list is rendered * Update packages/vuetify/src/components/VAutocomplete/VAutocomplete.ts Co-Authored-By: John Leider <john@vuetifyjs.com> * Update packages/vuetify/src/components/VAutocomplete/VAutocomplete.ts Co-Authored-By: John Leider <john@vuetifyjs.com> * Update packages/vuetify/src/components/VSelect/VSelect.ts Co-Authored-By: John Leider <john@vuetifyjs.com> * Update packages/vuetify/src/components/VSelect/VSelect.ts Co-Authored-By: John Leider <john@vuetifyjs.com> * style: rearrange stuff * fix: import getObjectValueByPath * fix(VSelect): remove duplicate import Co-authored-by: John Leider <john@vuetifyjs.com>
Description
Removed duplicated IDs in VSelectList caused by inheritAttrs
The v-card styles also make no visual difference so I removed that along with the redundant DOM element
Added aria-activedescendant to menu activators and v-select hidden input, auto ids on v-list-item in menu
Motivation and Context
fixes #9680
Markup:
Types of changes