-
Notifications
You must be signed in to change notification settings - Fork 90
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(Combobox): improve screen reader experience for Select-Only combobox w NVDA #1987
Conversation
…ete announcements
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.
brilliant @ze-flo 🙌
@@ -22,6 +22,9 @@ import { ThemeContext } from 'styled-components'; | |||
import { DEFAULT_THEME } from '@zendeskgarden/react-theming'; | |||
import { composeEventHandlers } from '@zendeskgarden/container-utilities'; | |||
|
|||
/** | |||
* 1. Hide from NVDA when collapsed to avoid incorrect / missing announcements caused by animation |
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.
[nit] this comment could be inlined – the header notation is more of a thing within CSS view components 😉
@jgorfine-zendesk Any objections to merging this fix? |
Nope, none from me, @ze-flo. Having watched your before & after videos, I'd say this is sounding pretty great. 🙌 Just to confirm: there's no scenario in which there's no animation, right? i.e., we're not unsetting the animation when we detect |
I'm glad you're bringing that up. Currently, we do not use For peace of mind, I've tested the current |
Description
This update fixes how our Comboboxes interact with NVDA during animations. Previously, NVDA users might have experienced incomplete or inaccurate announcements of the selected option when the dropdown list was animating. This was due to the way NVDA processes rapid changes in the page, which sometimes led to announcements being out of sync with the visual state.
Detail
The problem
When interacting with the Select-Only Combobox, NVDA's announcement of the selected option (e.g., "Label combo box Poppy collapsed opens list") is often interrupted by an incorrect announcement of a now-inactive option previously referenced by
aria-activedescendant
(e.g., "Poppy Lee 4 of 16").Analysis revealed that the dropdown animation is interfering with NVDA’s event queue, causing it to announce outdated or incorrect information. Disabling the animation did resolve the issue, allowing NVDA to announce the correct selected option without interruption, but another solution was preferred.
Screen.Recording.2024-12-03.at.11.48.28.AM.mov
To further demonstrate the problem, the issue was reproduced in a modified version of the ARIA Authoring Practices Guide (APG) Select-Only Combobox example by adding a slide animation to the dropdown. The animation caused NVDA to fail in announcing the correct selection.
Screen.Recording.2024-12-10.at.1.43.25.PM.mov
The solution
To address this, we now apply an aria-hidden="true" attribute to the Listbox immediately when it is set to
collapsed
and at the start of the animation sequence. This prevents screen readers from processing its contents during the animation. Now NVDA correctly process and announce the selected option without interruptions.Screen.Recording.2024-12-09.at.2.08.39.PM.mov
Regression testing
The fix was tested across various screen readers to ensure compatibility and continued functionality:
JAWS: Announcements work as expected.
Screen.Recording.2024-12-09.at.2.02.20.PM.mov
VoiceOver: Announcements work as expected.
[Video coming soon]
Checklist
👌 design updates will be Garden Designer approved (add the designer as a reviewer)npm start
)⬅️ renders as expected with reversed (RTL) direction⚫ renders as expected in dark mode🤘 renders as expected with Bedrock CSS (?bedrock
)