Accessibility

Make your views accessible to a broad range of users, including people with disabilities.

Topics

Essentials

Creating Accessible Views

Make your app accessible to everyone by applying accessibility modifiers to your SwiftUI views.

Customizing Accessibility Labels of a View

func accessibility(value: Text) -> ModifiedContent<Self, AccessibilityAttachmentModifier>

Adds a textual description of the value that the view contains.

func accessibility(hidden: Bool) -> ModifiedContent<Self, AccessibilityAttachmentModifier>

Specifies whether to hide this view from system accessibility features.

Accessibility Modifier Types

A set of types used to improve a view’s comprehensibility, interactivity, and navigability.

Customizing Accessibility Navigation of a View

func accessibility(sortPriority: Double) -> ModifiedContent<Self, AccessibilityAttachmentModifier>

Sets the sort priority order for this view’s accessibility element, relative to other elements at the same level.

See Also

Configuring Views

Layout

Tell a view how to arrange itself within a view hierarchy by adjusting its size, position, alignment, padding, and so on.

Rendering

Affect the way the system draws a view, for example by scaling or masking a view, or by applying graphical effects.

Styling

Indicate how to style the text, controls, and other content contained in a view.