Skip to content

[Google3 Bug]: MenuItemButton voice over/semantics doesn't pronounce disabled buttons #171231

@rezgoogle

Description

@rezgoogle

b/426553069

Help us understand the severity of this issue

  • causing severe production issues e.g. malfunctions or data loss
  • blocking next binary release
  • blocking a client feature launch within a quarter
  • nice-to-have but does not block a launch within the next quarter

Steps to reproduce

Google Earth uses MenuItemButton which calls private member _MenuItemLabel, however when the menu item is disabled the voice over semantics doesn’t announce that it’s disabled.
https://source.corp.google.com/piper///depot/google3/third_party/dart/flutter/lib/src/material/menu_anchor.dart;l=2766

what I see happening is if
a) there’s no semantic label provided, on line 2875, it labels it using _LocalizedShortcutLabel which doesn’t take in account the enabled state, or
b) on line 2889 it creates a Semantics(…) object if we provide a label, but again doesn’t have “enabled” field used.

this is where we use MenuItemButton: https://source.corp.google.com/piper///depot/google3/geo/earth/app/flutter/components/menu_items/lib/menu_items.dart;l=111

Expected results

voice over pronounces that the menu item is disabled when that menu item is disabled

Actual results

voice over calls a disabled menu item button as its regular semantic name

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: googleVarious Google teamsf: material designflutter/packages/flutter/material repository.found in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions