Skip to content

[Semantics] Add support for setting the heading level #97894

@vsomayaji

Description

@vsomayaji

Use case

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: new featureNothing broken; request for a new capabilitycustomer: castawaycustomer: troyframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions