Skip to main content
These iOS-only modifiers refine how a component is exposed to assistive technologies like VoiceOver. accessibilityHint adds a description of what activating the component will do; accessibilityAddTraits marks a component with semantic traits like header or button; accessibilityRepresentation swaps in an alternative tree for assistive technologies to traverse. Pair these with the cross-platform accessibilityLabel and accessibilityValue modifiers.

accessibilityHint

Sets a VoiceOver hint that describes the result of interacting with a component.
hint
string
required
A description of what happens when the user activates the component. VoiceOver reads this after a short pause following the label.
Describe the result of a tap
Combined with a label

accessibilityRepresentation

Provides an alternative accessibility representation of a component for assistive technologies.
content
Component
required
A component that replaces this component’s accessibility tree. Assistive technologies interact with this representation instead of the original component.
Provide a simpler accessibility view for a complex visual
Replace a custom layout with a descriptive label

accessibilityAddTraits

Adds accessibility traits to a component for assistive technologies like VoiceOver.
traits
AccessibilityTraits | AccessibilityTraits[]
required
One or more accessibility traits to add to the component. See AccessibilityTraits.
Mark a view as a button
Mark a view as a header
Add multiple traits

See also