Skip to content

fix(react-aria): only announce combobox section changes to VoiceOver - #10503

Open
gonzoblasco wants to merge 2 commits into
adobe:mainfrom
gonzoblasco:fix/combobox-announcement-section-gate
Open

fix(react-aria): only announce combobox section changes to VoiceOver#10503
gonzoblasco wants to merge 2 commits into
adobe:mainfrom
gonzoblasco:fix/combobox-announcement-section-gate

Conversation

@gonzoblasco

Copy link
Copy Markdown

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, useComboBox announces 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

  • Updated the combobox announcement tests to assert that per-item navigation no longer triggers a manual announcement, while section-entry announcements are preserved.
  • 218 tests pass in packages/@adobe/react-spectrum/test/combobox/ComboBox.test.js.
  • 41 tests pass in packages/react-aria-components/test/ComboBox.test.js.

Tested scenario matrix under mocked Apple platform:

  • Arrowing through items (no sections): no manual announcement.
  • Arrowing to the selected item: no manual announcement.
  • Entering a section: announces "Entered group X, with N options. Item".
  • Moving within a section: no manual announcement.
  • Selection: still announces "Item, selected".

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combobox only announces item name with VoiceOver

1 participant