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. To find out what enhancements you need, try using your app with accessibility features like VoiceOver, Voice Control, and Switch Control, or get feedback from users of your app that regularly use these features. Then use the accessibility view modifiers that SwiftUI provides to improve the experience. For example, you can explicitly add accessibility labels to elements in your UI using the accessibilityLabel(_:) or the accessibilityValue(_:) view modifier.

Customize your use of accessibility modifiers for all the platforms that your app runs on. For example, you may need to adjust the accessibility elements for a companion Apple Watch app that shares a common code base with an iOS app. If you integrate AppKit or UIKit controls in SwiftUI, expose any accessibility labels and make them accessible from your NSViewRepresentable or UIViewRepresentable views, or provide custom accessibility information if the underlying accessibility labels aren’t available.

For more information about creating a great experience for all users, see Accessibility.

Topics 話題

Essentials 要点

Technologies

Labels

Values

Hints

Actions

Activation Point

Elements

Custom Controls

Custom Content

Rotors

Focus

Traits

Color Inversion

Content Descriptions

VoiceOver

Charts

Large Content

Supporting Types 支援を行う型

See Also 参照

Configuring View Elements