Skip to content

Update semantics header property that it isn't supported on Android. #183111

@fabianbrandscheid

Description

@fabianbrandscheid

Use case

Just use the Semantics widget with the header property.
Since the Flutter 3.38.0 update, TalkBack on Android no longer recognizes the header when only header: true is set.

This does not work on Android:

Semantics(
  header: true,
  child: Text(title),
),

This does work on Android:

Semantics(
  header: true,
  headingLevel: 1,
  child: Text(title),
),

On iOS, both variants are detected as a header by the screen reader.

Proposal

When you provide the header property in the Semantics widget, it should also work on Android.
It’s quite strange that it only works on iOS, while on Android I have to additionally use headingLevel for it to be recognized correctly.
This PR attempted to fix the issue but was closed:
#179681
Could you clarify why it was closed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)d: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)triaged-accessibilityTriaged by Framework Accessibility team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions