Accessibility modifiers
Make your SwiftUI apps accessible to everyone, including people with disabilities.
Overview
Like all Apple UI frameworks, SwiftUI comes with built-in accessibility support. The framework introspects common elements like navigation views, lists, text fields, sliders, buttons, and so on, and provides basic accessibility labels and values by default. You don’t have to do any extra work to enable these standard accessibility features.
SwiftUI also provides tools to help you enhance the accessibility of your app. For example, you can explicitly add accessibility labels to elements in your UI using the accessibilityLabel(_:) or the accessibilityValue(_:) view modifier.
To learn more about adding accessibility features to your app, see Accessibility fundamentals.
Topics
Labels
accessibilityLabel(_:)accessibilityLabel(_:isEnabled:)accessibilityLabel(content:)accessibilityInputLabels(_:)accessibilityInputLabels(_:isEnabled:)accessibilityLabeledPair(role:id:in:)
Values
Hints
Actions
accessibilityAction(_:_:)accessibilityActions(_:)accessibilityAction(named:_:)accessibilityAction(action:label:)accessibilityAction(intent:label:)accessibilityAction(_:intent:)accessibilityAction(named:intent:)accessibilityAdjustableAction(_:)accessibilityScrollAction(_:)
Gestures
accessibilityActivationPoint(_:)accessibilityActivationPoint(_:isEnabled:)accessibilityDragPoint(_:description:)accessibilityDragPoint(_:description:isEnabled:)accessibilityDropPoint(_:description:)accessibilityDropPoint(_:description:isEnabled:)accessibilityDirectTouch(_:options:)accessibilityZoomAction(_:)
Elements
accessibilityElement(children:)accessibilityChildren(children:)accessibilityHidden(_:)accessibilityHidden(_:isEnabled:)
Custom controls
accessibilityRepresentation(representation:)accessibilityRespondsToUserInteraction(_:)accessibilityRespondsToUserInteraction(_:isEnabled:)
Custom content
Working with rotors
accessibilityRotor(_:entries:)accessibilityRotor(_:entries:entryID:entryLabel:)accessibilityRotor(_:entries:entryLabel:)accessibilityRotor(_:textRanges:)
Configuring rotors
Focus
Traits
Identity
Color inversion
Content descriptions
VoiceOver
speechAdjustedPitch(_:)speechAlwaysIncludesPunctuation(_:)speechAnnouncementsQueued(_:)speechSpellsOutCharacters(_:)