AccessibilityHeadingLevel
The hierarchy of a heading in relation to other headings.
Declaration
type AccessibilityHeadingLevel =
| 'h1'
| 'h2'
| 'h3'
| 'h4'
| 'h5'
| 'h6'
| 'unspecified'
| { rawValue: number; };@frozen enum AccessibilityHeadingLevelPass a literal, or build one with SwiftUI.AccessibilityHeadingLevel from import { SwiftUI } from 'swiftui-react-native'.
Type properties
Level 1 heading.
Level 2 heading.
Level 3 heading.
Level 4 heading.
Level 5 heading.
Level 6 heading.
'unspecified'SwiftUI.AccessibilityHeadingLevel.unspecifiedA heading without a hierarchy.
Type methods
Overview
Assistive technologies can use this to improve a user's navigation through multiple headings. When users navigate through top level headings they expect the content for each heading to be unrelated.
For example, you can categorize a list of available products into sections,
like Fruits and Vegetables. With only top level headings, this list requires no
heading hierarchy, and you use the unspecified heading level. On the other hand, if sections
contain subsections, like if the Fruits section has subsections for varieties of Apples,
Pears, and so on, you apply the h1 level to Fruits and Vegetables, and the h2
level to Apples and Pears.
Except for h1, be sure to precede all leveled headings by another heading with a level
that's one less.
From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
See also
More in Accessibility.
- AccessibilityActionCategoryDesignates an accessibility action category that is provided and named by the system.
- AccessibilityActionKindThe structure that defines the kinds of available accessibility actions.
- AccessibilityAdjustmentDirectionA directional indicator you use when making an accessibility adjustment.
- AccessibilityChildBehaviorDefines the behavior for the child elements of the new parent element.
- AccessibilityCustomContentKeyKey used to specify the identifier and label associated with an entry of additional accessibility information.
- AccessibilityDirectTouchOptionsAn option set that defines the functionality of a view's direct touch area.
- AccessibilityDirectTouchOptionsRawValueThe raw type that can be used to represent all values of the conforming type.
- AccessibilityLabeledPairRoleThe role of an accessibility element in a label / content pair.
- AccessibilitySystemRotorDesignates a Rotor that replaces one of the automatic, system-provided Rotors with a developer-provided Rotor.
- AccessibilityTextContentTypeTextual context that assistive technologies can use to improve the presentation of spoken text.
- AccessibilityTraitsA set of accessibility traits that describe how an element behaves.
- AccessibilityTraitsChainAccessibilityTraits with chained calls: SwiftUI.AccessibilityTraits.intersection(...).