Skip to content

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

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?

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    platform-androidAndroid applications specifically
    d: api docsIssues with https://api.flutter.dev/
    team-androidOwned by Android platform team
    on Mar 5, 2026
  2. mbcorona commented on Mar 5, 2026

    @mbcorona
    Member

    Hi @fabianbrandscheid, thank you for reporting.

    Routing this to team-android to evaluate if this intentional change requires updated API documentation to clarify the cross-platform behavior.

  3. added
    fyi-androidFor the attention of Android platform team
    team-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
    and removed
    team-androidOwned by Android platform team
    on Mar 5, 2026
  4. chunhtai commented on Mar 11, 2026

    @chunhtai
    Contributor

    Android doesn't have a header concept, they only have heading. In the past we mistakenly translate header:true into heading in android accessibility API. We later fixed the mistranslation.

    For the this issue, I think is WAI. However, I noticed our doc doesn't mention this https://api.flutter.dev/flutter/semantics/SemanticsProperties/header.html

    We should update the doc

  5. changed the title [-]The semantics header property should also work on Android.[/-] [+]Update semantics header property that it isn't supported on Android.[/+] on Mar 11, 2026
  6. added
    P3Issues that are less important to the Flutter project
    on Mar 18, 2026
  7. fabianbrandscheid commented on Mar 25, 2026

    @fabianbrandscheid
    Author

    @chunhtai At the moment, this means I have to set two properties in Flutter so that both platforms (Android and iOS) correctly expose the header/heading role of a text to the screen reader:

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

    This feels like a rather dirty workaround.
    Wouldn’t it be possible to provide a single header/heading flag that works consistently across both platforms?

  8. github-actions commented on Apr 22, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions