Accessibility value on iOS
An accessibility value helps users of assistive technologies to understand the state of elements on the screen. A slider should indicate the currently selected value, and ideally also it's minimum and maximum value. The screen reader announces the value of elements as it reads the screen. It is important to assign correct values to elements to avoid misunderstanding.
On iOS, you can set an accessibility value with the accessibilityValue
or accessibilityAttributedValue
property.
When using the semantically correct element, you usually do not need to modify the accessibilityValue
. For example, a UISwitch
sets the accessibilityValue
to selected
or not selected
and a UISlider
sets the accessibilityValue
to the current value. If the default value is incorrect or unclear, you can override the value manually.