Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Oct 24, 2022

This fixes the following issues with ARIA labels, groups, and heading:

  • Replace <flt-semantics-value> with role="text". The text role works better in Safari, and the extra element causes the AT to read the same label multiple times. (fixes [web]: Semantics differences between iOS/Android and Web flutter#91914)
  • Use explicit role="group" for nodes with children. This communicates the label to the user as a group of elements, enabling enter/exit group gestures.
  • Do not use role="heading" for nodes with children, because that prevents the AT from reaching child nodes.

This change does not fix the issue with Chrome reading "group" or "empty group" on text labels. I could not find a way to simultaneously control the positioning/sizing of an element and have it be treated as text. Using actual text in HTML causes the browser to size the focus ring to just the text itself rather than the element. Adding aria-label fixes the sizing but "group"/"empty group" reappear.

@yjbanov yjbanov requested a review from nbayati October 24, 2022 21:25
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Oct 24, 2022
@yjbanov yjbanov added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 28, 2022
@auto-submit auto-submit bot merged commit 73664bc into flutter:main Oct 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 28, 2022
schwa423 pushed a commit to schwa423/engine that referenced this pull request Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web]: Semantics differences between iOS/Android and Web

3 participants