Repository navigation
Description
Autocomplete's option items never get SemanticsRole.option, so on web the options popup is exposed as button children (with aria-current for the highlighted one) rather than option children with aria-selected.
#192971 adds SemanticsRole.listBox / SemanticsRole.option to the framework and engine. It cannot assign option to the items: RawAutocomplete only sees the opaque widget returned by the caller's optionsViewBuilder, and the default item builder lives in material_ui (flutter/packages), which is tested against stable and can't reference the new enum yet.
Follow-up (this issue), in flutter/packages/packages/material_ui:
lib/src/autocomplete.dart_AutocompleteOptions: wrap the options view inSemantics(role: SemanticsRole.listBox, container: true, explicitChildNodes: true).lib/src/autocomplete.dart_AutocompleteOptionsList: addrole: SemanticsRole.optionto the per-itemSemantics(button: true, selected: highlight, ...)wrapper (selected:landed in [material_ui] Improve Autocomplete, DrawerHeader, and Tooltip accessibility packages#12918). The web engine resolves the explicit role before thebuttonflag, and the framework'soptioncheck only requires alistBoxancestor, so theListViewscroll wrappers between them are fine.lib/src/dropdown_menu.dart: entries areMenuItemButtons inside aMenuAnchorwith nolistBoxcontainer, andDropdownMenuis a combobox pattern, so this needs a design decision (listbox vs. menu popup) rather than a one-liner. Evaluate separately.- Re-verify
#/auto-completeinpackages/material_ui/test_apps/a11y_assessments(ChromeAccessibility.getFullAXTreeshould showrole=listbox>role=optionwitharia-selected).
Blocked on #192971 shipping in a stable Flutter release; material_ui then needs a min-Flutter bump to that version (cf. #192839 for why it can't reference master-only APIs under the current >=3.47.0 constraint).
Related VPAT: b/464138739, b/460080184. Related: #156371.
Activity
Drop RawAutocomplete listBox wrapper; test option+isButton precedence
[web] Add SemanticsRole.listBox and SemanticsRole.option (flutter#192971
[web] Add SemanticsRole.listBox and SemanticsRole.option (flutter#192971
mmohankrishna-lab commentedon Nov 2, 2026
Status: #192971 merged to master on Oct 13 (b535b37), about 4 hours after the 3.50 beta branched from 0e4dea4. It isn't in 3.50.0-0.3.pre or stable 3.47.9. So this will need the stable release after 3.50, plus a minimum Flutter bump in material_ui (in the same PR, per #192839).
In the meantime I'll prepare the _AutocompleteOptions (SemanticsRole.listBox) and _AutocompleteOptionsList (SemanticsRole.option) changes and tests against master. I'll open the PR when the minimum can be raised. I'll leave DropdownMenu out of scope, as suggested in the issue description.
mmohankrishna-lab commentedon Nov 3, 2026
I'd like to pick this up once it's unblocked.
Status: #192971 merged to master on Oct 13 (b535b37), about 4 hours after the 3.50 beta branched from 0e4dea4. It isn't in 3.50.0-0.3.pre or stable 3.47.9. So this will need the stable release after 3.50, plus a minimum Flutter bump in material_ui (in the same PR, per #192839).
In the meantime I'll prepare the _AutocompleteOptions (SemanticsRole.listBox) and _AutocompleteOptionsList (SemanticsRole.option) changes and tests against master. I'll open the PR when the minimum can be raised. I'll leave DropdownMenu out of scope, as suggested in the issue description.