-
Notifications
You must be signed in to change notification settings - Fork 82
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: set aria-selected on selected item, not the focused one #5402
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
* @protected | ||
* @override | ||
*/ | ||
_isItemSelected(item, _selectedItem, itemIdPath) { |
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.
Yeah, it seems to be a separate issue since it also happens on master
. Also, ed31808 doesn't seem to have any effect on multi-select-combo-box
.
This ticket/PR has been released with Vaadin 24.0.0.alpha10 and is also targeting the upcoming stable 24.0.0 version. |
Description
Fixes #720
This PR fixes an issue found by @vursen while looking into the
vaadin-list-box
fix foraria-selected
state.For some historical reasons, we originally tried to announce focused item change by updating this attribute.
At least in VoiceOver this causes duplicate announcements: both the input text and item are announced.
Now when the
<input>
element is placed in light DOM and linked with the overlay, let's fix this logic.Type of change
Testing
VoiceOver + Chrome
Both selected and not selected states are announced 🎉
Note, VoiceOver + Safari has known issues that don't seem to be affected by this PR: #2748
JAWS + Edge
Selected item is not announced. This problem also exists on master, I think it's because of focus not moving to the item.
This seems to be the same as #163 - we can't really do anything about it, without changing how combo-box works 😕
NVDA + Edge
Selected item is not announced, instead items that are not selected get announced. So it seems to work as expected 😎