You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b535b37
Browse filesBrowse the repository at this point in the historyBrowse files
[web] Add SemanticsRole.listBox and SemanticsRole.option (#192971)
Adds `SemanticsRole.listBox` and `SemanticsRole.option` across
`dart:ui`, the Web semantics engine (emitting `aria-selected` on
selectable options), and `_DebugSemanticsRoleChecks` (widget wiring
tracked in #194031). Verified:
`felt test test/engine/semantics/semantics_test.dart` and `flutter test
test/widgets/semantics_role_checks_test.dart`.
- `engine/src/flutter/lib/ui/semantics.dart`,
`engine/src/flutter/lib/ui/semantics/semantics_node.h`,
`AccessibilityBridge.java`,
`engine/src/flutter/lib/web_ui/lib/semantics.dart`: Adds
`SemanticsRole.listBox` (`kListBox = 34`) and `SemanticsRole.option`
(`kOption = 35`).
- `engine/src/flutter/lib/web_ui/lib/src/engine/semantics/list.dart`,
`checkable.dart`, `scrollable.dart`, `semantics.dart`: Implements
`SemanticListBox` (`role="listbox"`) and `SemanticOption`
(`role="option"` with `aria-selected="true"|"false"`), and omits
intermediate `role="group"` on unlabeled scrollables inside a `listBox`.
- `packages/flutter/lib/src/semantics/semantics.dart` &
`packages/flutter/test/widgets/semantics_role_checks_test.dart`:
Validates in `_DebugSemanticsRoleChecks` that `SemanticsRole.option` has
an ancestor `SemanticsRole.listBox`.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
0 commit comments