Skip to content

[Semantics] Add support for setting the heading level on iOS and macOS #155928

@koral--

Description

@koral--

Use case

This is a follow-up of closed #97894.
iOS and macOS platforms support AccessibilityHeadingLevel which is an equivalent of ARIA: heading role on web.
iOS support was mentioned by both the OP and in the comment: #97894 (comment) but the related PR #41435 added the heading level support for the web only.

Different heading levels can speed up the navigation in case of VoiceOver users. They can quickly navigate between subsequent headings (either any or at the same level only) using the keyboard shortcuts: https://support.apple.com/guide/voiceover/search-commands-cpvokys08/mac

Proposal

Required changes are analogous to those made in flutter/engine#41435 for web.
Here is how to set the heading level: https://developer.apple.com/documentation/swiftui/view/accessibilityheading(_:)

iOS/macOS also have 6 heading levels (from 1 to 6) like web. The value of 0 can probably be mapped to unspecified.

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)c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterplatform-iosiOS applications specificallyplatform-macBuilding on or for macOS specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions