fix(react-aria): only announce combobox section changes to VoiceOver - #10503
Open
gonzoblasco wants to merge 2 commits into
Open
fix(react-aria): only announce combobox section changes to VoiceOver#10503gonzoblasco wants to merge 2 commits into
gonzoblasco wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #10220: ComboBox only announced the item name with VoiceOver, losing the richer native announcement (selected state, menu item role, item count).
Root cause
On Apple devices,
useComboBoxannounces every focused-item change through a live region. Current VoiceOver versions announce per-item details (selected state, role, item count) natively while arrowing within a section, so that live-region announcement interrupts and replaces the richer native speech with just the item name.Change
Gate the manual announcement so it only fires when navigating into a new section, where VoiceOver is silent and the section title + option count are not announced natively. Arrowing within the same section no longer triggers a manual announcement, letting VoiceOver handle it.
This keeps the inter-section navigation announcements (section title + option count) that were the reason the effect existed, while no longer stomping on VoiceOver's native per-item announcements.
Tests
packages/@adobe/react-spectrum/test/combobox/ComboBox.test.js.packages/react-aria-components/test/ComboBox.test.js.Tested scenario matrix under mocked Apple platform: