Repository navigation
[linux] Use semantics heading level for accessibility headings - #196758
robert-ancell wants to merge 1 commit into
Conversation
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.
There was a problem hiding this comment.
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.
|
@paul-geoghegan can you confirm the roles are correctly set? |
mattkae
left a comment
There was a problem hiding this comment.
LGTM, minus a potential nit
paul-geoghegan
left a comment
There was a problem hiding this comment.
Submitting approval after testing the heading levels with Orca.
paul-geoghegan
left a comment
There was a problem hiding this comment.
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.
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.