Mobile Accessibility Guidelines
– Text Equivalents
Roles, traits and properties
Elements must have accessibility properties set appropriately.
Users of assistive technology, such as screen readers, rely on accessibility properties such as role, name, value, and state to be set appropriately in order to know how to identify and interact with an element or object.
For example, on iOS a trait of ‘button’ must be set in order for a VoiceOver user to know what the element does and how to interact with it. With HTML content, if a VoiceOver user hears “button” they know to use the Enter key, if they hear “link” they know to use the Space Bar.
Standard elements generally provide roles, traits and properties by default within the platform. Custom elements and objects will require all accessibility roles, traits and properties to be set.
In iOS, roles and states are referred to as traits. Traits can be set either through the Identity Inspector, by selecting the desired trait(s) for the control within the Accessibility panel, or at code level. Page elements can have one or more traits, which include the examples below.
Make sure that an accessible name is applied (through the accessibilityLabelattribute) to all page [...]