WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Apple Accessibility API

for

From: joe
Date: Feb 27, 2020 6:20AM


Hi Sean,

Unless the states are built into the native iOS components (UISlider,
UISwitch, etc.), then no.

Apple uses accessibility traits
(https://developer.apple.com/documentation/uikit/accessibility/uiaccessibili
ty/accessibility_traits?language=objc) for any common states (Selected,
NotEnabled [dimmed] and Adjustable)

If you need custom states, these have to be added to elements at runtime by
adding them to the end of the accessibilityLabel or potentially using the
accessibilityValue. IMO the accessibilityValue should be modified by
developers with caution because it can overwrite user input values (e.g. if
used on a UITextField)

iOS states are definitely not as well supported (beyond the 3 mentioned
above) as states are in HTMl with native elements and ARIA.

Thankx,
Joe Humbert