Skip to content

[linux] Use semantics heading level for accessibility headings - #196758

Open
robert-ancell wants to merge 1 commit into
flutter:masterfrom
robert-ancell:linux-heading-level
Open

robert-ancell wants to merge 1 commit into
flutter:masterfrom
robert-ancell:linux-heading-level

Conversation

@robert-ancell

Copy link
Copy Markdown
Contributor

Match iOS and Android by using the heading level to determine if a node is a heading, and report it as the ATK "level" attribute so screen readers such as Orca can announce e.g. "heading level 2".

The header flag indicates a banner (e.g. an app bar), not a heading, so map it to ATK_ROLE_HEADER.

Match iOS and Android by using the heading level to determine if a node
is a heading, and report it as the ATK "level" attribute so screen
readers such as Orca can announce e.g. "heading level 2".

The header flag indicates a banner (e.g. an app bar), not a heading, so
map it to ATK_ROLE_HEADER.
@robert-ancell
robert-ancell requested a review from a team as a code owner November 17, 2026 04:27
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 17, 2026
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-linux Building on or for Linux specifically a: desktop Running on desktop team-linux Owned by the Linux platform team labels Nov 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for heading levels in the Linux accessibility implementation (FlAccessibleNode). It introduces a heading_level field, exposes it via the ATK 'level' attribute, maps nodes with a heading level to ATK_ROLE_HEADING, and updates nodes with the is_header flag to use ATK_ROLE_HEADER. Feedback suggests expanding the unit tests to verify that resetting the heading level back to 0 correctly clears the heading role and its associated attributes.

@robert-ancell

Copy link
Copy Markdown
Contributor Author

@paul-geoghegan can you confirm the roles are correctly set?

@mattkae mattkae left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minus a potential nit

@paul-geoghegan paul-geoghegan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitting approval after testing the heading levels with Orca.

@paul-geoghegan paul-geoghegan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Linux with Orca. Headings are announced with the correct levels (1–6), and header-only nodes aren’t exposed as headings. Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-linux Building on or for Linux specifically team-linux Owned by the Linux platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants