Skip to content

A11Y: Can't read text with semantics header:true #187925

Closed

Description

@paul-geoghegan

Steps to reproduce

  1. Create some text and make it a header like:
            Semantics(
              header: true,
              child: Focus(
                child: Text('Section One'),
              ),
            ),
  1. Start your app with flutter run
  2. Try to tab to the heading
  3. Notice that Orca just says heading and doesn't read the text

Expected results

It should read "section 1 header".

Actual results

It just says "header" and ignores the text.

Code sample

Code sample

You can either use the snippet below or go to this repo, then cd headers_arent_read and flutter run.

import 'package:flutter/material.dart';

const String _appTitle = 'Headers Aren\'t Read';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _appTitle,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
          seedColor: const Color(0xFFE95420), // Ubuntu Orange
          primary: const Color(0xFFE95420), // Ubuntu Orange
          secondary: const Color(0xFF772953), // Canonical Aubergine
        ),
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text(_appTitle),
      ),
      body: Padding(
        padding: EdgeInsets.all(24.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            // BUG: Orca only announces "header" — the label is never read.
            Semantics(
              header: true,
              child: Focus(
                child: Text('Section One'),
              ),
            ),

            SizedBox(height: 32),
            // WORKS: Orca reads the text correctly when header is removed.
            Semantics(
              header: false,
              child: Focus(
                child: Text('Section Two'),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.41.5,
    on Ubuntu Stonking Stingray
    (development branch)
    7.0.0-22-generic, locale
    en_US.UTF-8) [67ms]
    • Flutter version 3.41.5 on
      channel stable at
      /home/paul/development/flutter
    • Upstream repository
      https://github.com/flutter/flu
      tter.git
    • Framework revision 2c9eb20739
      (3 months ago), 2026-03-17
      16:14:01 -0700
    • Engine revision 052f31d115
    • Dart version 3.11.3
    • DevTools version 2.54.2
    • Feature flags: enable-web,
      enable-linux-desktop,
      enable-macos-desktop,
      enable-windows-desktop,
      enable-android, enable-ios,
      cli-animations,
      enable-native-assets,
      omit-legacy-version-file,
      enable-lldb-debugging,
      enable-uiscene-migration
[✗] Android toolchain - develop for
    Android devices [54ms]
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/
      studio/index.html
      On first launch it will assist
      you in installing the Android
      SDK components.
      (or visit
      https://flutter.dev/to/linux-a
      ndroid-setup for detailed
      instructions).
      If the Android SDK has been
      installed to a custom
      location, please use
      `flutter config --android-sdk`
      to update to that location.
[✗] Chrome - develop for the web
    (Cannot find Chrome executable
    at google-chrome) [17ms]
    ! Cannot find Chrome. Try
      setting CHROME_EXECUTABLE to a
      Chrome executable.
[✓] Linux toolchain - develop for
    Linux desktop [523ms]
    • Ubuntu clang version 21.1.8
      (6ubuntu1)
    • cmake version 4.2.3
    • ninja version 1.13.2
    • pkg-config version 2.5.1
    • OpenGL core renderer: AMD
      Radeon 890M Graphics
      (radeonsi, strix1, ACO, DRM
      3.64, 7.0.0-22-generic)
    • OpenGL core version: 4.6 (Core
      Profile) Mesa 26.0.3-1ubuntu1
    • OpenGL core shading language
      version: 4.60
    • OpenGL ES renderer: AMD Radeon
      890M Graphics (radeonsi,
      strix1, ACO, DRM 3.64,
      7.0.0-22-generic)
    • OpenGL ES version: OpenGL ES
      3.2 Mesa 26.0.3-1ubuntu1
    • OpenGL ES shading language
      version: OpenGL ES GLSL ES
      3.20
    • GL_EXT_framebuffer_blit: yes
    •
      GL_EXT_texture_format_BGRA8888
      : yes
[✓] Connected device (1 available)
    [126ms]
    • Linux (desktop) • linux •
      linux-x64 • Ubuntu Stonking
      Stingray (development branch)
      7.0.0-22-generic
[✓] Network resources [351ms]
    • All expected network resources
      are available.
! Doctor found issues in 2
  categories.

Activity

  1. added
    team-linuxOwned by the Linux platform team
    team-macosOwned by the macOS platform team
    team-windowsOwned by the Windows platform team
    team-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
    and removed
    team-linuxOwned by the Linux platform team
    on Jun 12, 2026
  2. added theissue type on Jun 12, 2026
  3. removed
    team-macosOwned by the macOS platform team
    team-windowsOwned by the Windows platform team
    team-linuxOwned by the Linux platform team
    on Jun 12, 2026
  4. flutter-triage-bot commented on Jun 12, 2026

    @flutter-triage-bot

    Issue is assigned to multiple teams (macos, windows, linux, accessibility). Please ensure the issue has only one team-* label at a time. Use fyi-* labels to have another team look at the issue without reassigning it.

  5. removed
    team-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
    on Jun 12, 2026
  6. removed theissue type on Jun 12, 2026
  7. added
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    platform-linuxBuilding on or for Linux specifically
    on Jun 12, 2026
  8. 3 remaining items

  9. added
    triaged-linuxTriaged by the Linux platform team
    P2Important issues not at the top of the work list
    on Jun 17, 2026
  10. hannah-hyj commented on Jun 17, 2026

    @hannah-hyj
    Member

    @paul-geoghegan Can you confirm this issue is only on linux? I think it should be able to announce on iOS and android?

  11. paul-geoghegan commented on Jun 22, 2026

    @paul-geoghegan
    Author

    Yes, I think it's just on desktop.

  12. added
    team-linuxOwned by the Linux platform team
    and removed
    team-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
    on Jun 23, 2026
  13. added a commit that references this issue on Aug 19, 2026
    7c18a85
  14. github-actions commented on Sep 2, 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.

  15. locked as resolved and limited conversation to collaborators on Sep 2, 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

    P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-linuxBuilding on or for Linux specificallyteam-linuxOwned by the Linux platform teamtriaged-linuxTriaged by the Linux platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions