Skip to content
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(multiple): fix VoiceOver confused by Select/Autocomplete's ARIA semantics #1904

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhaertwig
Copy link
Collaborator

For Select and Autocomplete components, fix issues where VoiceOver was confused by the ARIA semantics of the combobox. Fix multiple behaviors:

  • Fix VoiceOver focus ring stuck on the combobox while navigating options.
  • Fix VoiceOver would sometimes reading option as a TextNode and not communicating the selected state and position in set.
  • Fix VoiceOver "flickering" behavior where VoiceOver would display one announcement then quickly change to another announcement.

Fix the same issues for both Select and Autocomplete component.

Implement fix by correcting the combobox element and also individual options.

First, move the aria-owns reference to the overlay from the child of the combobox to the parent modal of the comobobx. Having an aria-owns reference inside the combobox element seemed to confuse VoiceOver.

Second, apply aria-hidden="true" to the ripple element and pseudo checkboxes on sbb-option. These DOM nodes are only used for visual purposes, so it is most appropriate to remove them from the accessibility tree. This seemed to make VoiceOver's behavior more consistent.

…emantics

For Select and Autocomplete components, fix issues where VoiceOver was confused by the ARIA semantics of the combobox. Fix multiple behaviors:

 - Fix VoiceOver focus ring stuck on the combobox while navigating options.
 - Fix VoiceOver would sometimes reading option as a TextNode and not communicating the selected state and position in set.
 - Fix VoiceOver "flickering" behavior where VoiceOver would display one announcement then quickly change to another announcement.

Fix the same issues for both Select and Autocomplete component.

Implement fix by correcting the combobox element and also individual options.

First, move the aria-owns reference to the overlay from the child of the combobox to the parent modal of the comobobx. Having an aria-owns reference inside the combobox element seemed to confuse VoiceOver.

Second, apply `aria-hidden="true"` to the ripple element and pseudo checkboxes on sbb-option. These DOM nodes are only used for visual purposes, so it is most appropriate to remove them from the accessibility tree. This seemed to make VoiceOver's behavior more consistent.
Copy link
Collaborator

@kyubisation kyubisation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Collaborator

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants