You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Semantics] Add support for setting the heading level #97894
Using SemanticsProperties.header, we can configure an element with the heading role. However, because there isn't a way to set the level of the heading, all headings on the page default to level 2.
Proposal
Allow setting the heading level through something like SemanticsProperties.headerLevel. This could map to aria-level on web and AccessibilityHeadingLevel on iOS. I'm not sure if there's an equivalent on Android.
@goderbauer yes, headings especially when it relates to web, are used for navigation. Screen reader users can either press 1 through 6 to navigate to various heading levels, or use the H key to jump between all headings on a page. You can find more information in WCAG guideline 2.4.6 (Headings and labels) https://www.w3.org/WAI/WCAG21/Understanding/headings-and-labels.html
Reacted by Edgar Froes, Mike Behnke and Philipp Tautz
The PR that says it fixes this issue is explicitly only for Web Semantics, and does not appear to address setting the iOS AccessibilityHeadingLevel property at all. I didn't see mention of that in the PR comments, but I hesitate to comment there as it's already merged.
Did I miss it or was it handled elsewhere? If not, is this something we can make sure is also addressed either before this issue is considered closed or by making sure there is an issue specific to the iOS AccessibilityHeadingLevel so it is set properly?
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.
Activity
goderbauer commentedon Feb 9, 2022
Is that information used for anything by a11y tools?
For iOS looks like this was recently added in iOS 15.
ryan-bishop commentedon Feb 10, 2022
@goderbauer yes, headings especially when it relates to web, are used for navigation. Screen reader users can either press 1 through 6 to navigate to various heading levels, or use the H key to jump between all headings on a page. You can find more information in WCAG guideline 2.4.6 (Headings and labels)
https://www.w3.org/WAI/WCAG21/Understanding/headings-and-labels.html
fideldonson commentedon May 15, 2023
aria-level is a required attribute of the heading role and as such heading is not valid if aria-level is not present.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-level
Add support for setting the heading level for web semantics (flutter#…
Skip test temporarily until headingLevel is added in engine (issue 41… (
Add support for setting the heading level for web semantics (#97894) (#…
11a32d4 Add support for setting the heading level for web semantics (f…
Roll Flutter Engine from e884690 to 11a32d4 (2 revisions) (#149699)
localpcguy commentedon Jun 5, 2024
The PR that says it fixes this issue is explicitly only for Web Semantics, and does not appear to address setting the iOS AccessibilityHeadingLevel property at all. I didn't see mention of that in the PR comments, but I hesitate to comment there as it's already merged.
Did I miss it or was it handled elsewhere? If not, is this something we can make sure is also addressed either before this issue is considered closed or by making sure there is an issue specific to the iOS AccessibilityHeadingLevel so it is set properly?
Add support for setting the heading level for web semantics (#97894) (#…
github-actions commentedon Jun 20, 2024
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 -vand a minimal reproduction of the issue.