Accessibility in SwiftUI
Show Apple's description.
Making your app accessible is critical, but just as important is designing a fantastic accessibility experience. Learn what makes a great experience and how to make your app understandable, navigable, and interactable. SwiftUI builds accessibility into your app for you! Discover how much you get with no extra adoption, like accessible images and controls. Identify where you can add supplemental accessibility information with the new SwiftUI Accessibility API, which gives you the tools to add information to elements such as labels, values, and hints.
Make sure the app accessibility is:
- Understandable: Labels
- Interactable: Actions
- Navigable: Ordering and Grouping
E.g. after pressing the equal button
= on a calculator app, we can fire an accessibility notification telling Siri that the result value has changed.
Making Buttons More Accessible
Making Images More Accessible
- Images can be created with an optional
labelparameter, this parameter will be used by voiceover and the likes.
- If an image is not part of the core experience we can initialize it with the
decorativeparameter, this way it will be ignored by the accessibility system features.