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.
If your state is not
notEnabled, we recommended using the
accessibilityValue attribute to indicate the state.
element.accessibilityTraits = .selected element.accessibilityTraits = .notEnabled element.accessibilityValue = "Expanded" element.accessibilityValue = "Collapsed"