Skip to content

[material_ui] Improve Autocomplete, DrawerHeader, and Tooltip accessibility - #12918

Open
kevmoo wants to merge 3 commits into
flutter:mainfrom
kevmoo:material-ui-a11y
Open

kevmoo wants to merge 3 commits into
flutter:mainfrom
kevmoo:material-ui-a11y

Conversation

@kevmoo

@kevmoo kevmoo commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Description

Improves accessibility across Autocomplete, DrawerHeader, and TooltipThemeData in packages/material_ui (WCAG 1.3.1, WCAG 1.4.13, WCAG 4.1.2):

  1. Autocomplete option selection semantics (WCAG 4.1.2, http://b/464138739, http://b/464133587, http://b/464122713): Exposes selected: highlight on Autocomplete option Semantics nodes so screen readers announce which option is currently keyboard-highlighted.
  2. DrawerHeader heading semantics (WCAG 1.3.1, http://b/462597561, http://b/462583677): Wraps DrawerHeader in Semantics(header: true) so screen readers expose heading structure for navigation drawer headers.
  3. TooltipThemeData.ignorePointer (WCAG 1.4.13 Hoverable, http://b/463913706): Adds final bool? ignorePointer; to TooltipThemeData and honors _tooltipTheme.ignorePointer in Tooltip.build so applications can opt into WCAG 1.4.13 hoverable tooltips globally (TooltipThemeData(ignorePointer: false)) without regressing flutter/flutter#142465.
    (Companion RawTooltipState Escape key dismissal is in flutter/flutter#192966 per flutter/flutter#188444).

Related Issues

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I titled the PR using [Conventional Commits].
  • I did not modify the CHANGELOG.md or pubspec.yaml files (created pending_changelogs/a11y_autocomplete_drawer_tooltip.yaml instead).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I have reviewed my own code and left any helpful comments for reviewers.
  • I signed the [CLA].

…bility

- Expose selected state (selected: highlight) on Autocomplete option items so screen readers announce the keyboard-highlighted option (b/464138739, b/464133587, b/464122713).
- Wrap DrawerHeader in Semantics(header: true) so screen readers expose heading structure (b/462597561, b/462583677).
- Add ignorePointer to TooltipThemeData so applications can configure hoverable tooltips globally (TooltipThemeData(ignorePointer: false)) for WCAG 1.4.13 Hoverable compliance without regressing flutter/flutter#142465 (b/463913706).
@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Sep 18, 2026
@kevmoo
kevmoo marked this pull request as ready for review September 18, 2026 04:06

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request exposes the selected state on Autocomplete option semantics, wraps DrawerHeader in Semantics(header: true), and adds ignorePointer to TooltipThemeData to support WCAG 1.4.13 Hoverable tooltips. Feedback suggests removing a redundant Builder widget in Autocomplete's itemBuilder to simplify the widget tree, as the builder context is already provided by itemBuilder.

Comment thread packages/material_ui/lib/src/autocomplete.dart Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant