-
Notifications
You must be signed in to change notification settings - Fork 843
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
[EuiComboBox] Improve accessibility of virtualized listbox #8333
[EuiComboBox] Improve accessibility of virtualized listbox #8333
Conversation
- ensures virtualized list behavior to reload new options is triggered
Preview staging links for this PR:
|
💚 Build Succeeded
|
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.
Does what it says! 💯
(checked with VoiceOver and NVDA 2024.4 + Chrome 132)
There seems to be an issue in Safari + VoiceOver(testing in Safari 18.3 and macOS 14.7.4): Navigating the option inside the list is not announced.
I don't quite understand what this means, but in any case I agree it could be addressed separately.
What this means is that in that scenario the screen reader focuses the input but using arrow keys to navigate the listbox options does not work. Expected:
Unexpected:
See a recording of it hereScreen.Recording.2025-02-25.at.13.29.49.mov |
Ah, got it. This works for me in Safari 18.2 and macOS 15.3.1, maybe it's the macOS version? The only thing that I find weird in that environment is the disabled items, they're announced as "dimmed" (not sure if that's actually correct for VoiceOver). |
Ah, that's good news! I was wondering if it might be the OS version since I'm still on the old macOS due to my Parallels version 🫠
That's expected. VoiceOver announces disabled items as "dimmed" 👍 |
# Backport This is a manual backport of #212974 and #213292 --- `99.3.0-classic.0` ⏩ `100.0.0-classic.0` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) --- ## [`v100.0.0`](https://github.com/elastic/eui/releases/v100.0.0) **Bug fixes** - Fixed `EuiComboBox` by cleaning duplicated values when having a delimiter prop. ([#8335](elastic/eui#8335)) ## [`v99.4.0`](https://github.com/elastic/eui/releases/v99.4.0) - Minor design updates to `EuiCollapsibleNavBeta` ([#8332](elastic/eui#8332)) - Allow section without a title - Second-level icons should be horizontally aligned with the top-level icon - Turn off text truncation for nav items - Added `quickSelectButtonProps` to `EuiSuperDatePicker` ([#8380](elastic/eui#8380)) **Bug fixes** - Fixed a bug in `EuiHeader` where the navigation of `EuiCollapsibleNavBeta` would render below the `EuiFlyout`'s overlay ([#8325](elastic/eui#8325)) **Accessibility** - Improved the accessibility of `EuiComboBox` by adding `aria-setsize` and `aria-posinset` to ensure correct information is provided for its virtualized listbox ([#8333](elastic/eui#8333)) - Improved the `EuiAccordionTrigger`'s screen reader UX by passed `aria-hidden` to the `EuiAccordionArrow` to avoid duplicated announcements by screen readers. ([#8342](elastic/eui#8342)) --------- Co-authored-by: Elastic Machine <[email protected]>
Summary
closes #8267
This PR updates
EuiComboBox
adding/updating it's markup to ensure expected output for screen readers.The updates are based on the common web pattern for a combobox (ref)
Unexpected behavior:
NVDA (Windows) & Chrome
Screen.Recording.2025-02-19.at.10.17.59.mov
VoiceOver (macOS) & Chrome
Screen.Recording.2025-02-19.at.09.51.01.mov
Expected behavior:
aria-setsize
)aria-posinset
EuiComboBox
removes selected items, so currently they are never selected inside the listbox) (apply correct condition foraria-selected
)NVDA (Windows) & Chrome
Screen.Recording.2025-02-19.at.11.41.02.mov
VoiceOver (macOS) & Chrome
Screen.Recording.2025-02-19.at.11.42.50.mov
Note
There seems to be an issue in Safari + VoiceOver(testing in Safari
18.3
and macOS14.7.4
): Navigating the option inside the list is not announced.This seems to be related to the focus staying inside the input, but the options should actually be announced due to the correctly placed
aria-descendant
even if the focus is not actually moved to the options.This is also happening for the current production state and can also be observed in external components e.g. for MUI ComboBox component.
This should rather be looked into separately if it's something we can influence or it's an issue with Safari + VoiceOver specifically. Maybe it's also macOS/browser version specific 🤷♀️ 🤔
QA
General checklist
Checked in both light and dark modesChecked in mobileAdded documentationProps have proper autodocs (using@default
if default values are missing) and playground togglesChecked Code Sandbox works for any docs examplesAdded or updated jest and cypress testsUpdated visual regression testsIf applicable, added the breaking change issue label (and filled out the breaking change checklist)If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)