Accessibility state on iOS
An accessibility state helps users of assistive technologies to understand the state of elements on the screen. The state
selected for example, indicates that an element has been selected. The screen reader announces the state of elements as it reads the screen. It is important to assign correct states of elements to avoid misunderstanding.
On iOS, the
accessibilityTraits attribute can be used to indicate the accessibility state. The traits
notEnabled can be used to indicate the current state.
Other values are listed in the
element.accessibilityTraits = .selected element.accessibilityTraits = .notEnabled