-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Open
Labels
a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)Owned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
Description
Use case
I noticed this @chunhtai's comment at #173418 (comment):
"we should check defaultTargetPlatform instead of from the theme, if for some reason someone wants android feels and look on an iOS, the voice over will still be broken"
Indeed, in case users explicitly configure a specific platform (let's give it as Android for eg), but run on another platforms (let's give it as iOS for eg), accessibility might work incorrectly.
There are a few existing widgets that use platform from the theme to check:
- ExpansionTile:
switch (theme.platform) { |
- AppBar:
namesRoute: switch (theme.platform) { |
- Dialog:
switch (theme.platform) { |
namesRoute: label == null && theme.platform != TargetPlatform.iOS, |
switch (theme.platform) { |
namesRoute: label == null && theme.platform != TargetPlatform.iOS, |
Proposal
Use defaultTargetPlatform instead of using platform from the theme.
Metadata
Metadata
Assignees
Labels
a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)Owned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)