I'm building a custom UIAccessibilityElement
for a complex control, and would like to expose both the .adjustable
UIAccessibilityTrait
(to move between discrete members listed in the control) and accessibilityCustomActions
(to enable multiple possible interactions).
My (limited) experience is that both adjustment and custom action selection employ vertical swipes, so they collide if an element exposes both: vertical swipes call accessibilityIncrement
and accessibilityDecrement
, which I'm using to move between the members, and the accessibility element is described as having "Actions available" but there seems to be no way to access them.
Is there a way, beyond reimplementing my increment and decrement methods to append the custom actions to the discrete element list somehow, to enable a user to interrogate both these extra dimensions on a single accessibility element?
Yes, you can implement both the increment/decrement and custom actions functions on your element. By default, if an element has the adjustable trait, VoiceOver will switch to the "adjust" rotor when that element is focused. However, the actions rotor will still be in the list. To use the rotor, twist with 2 fingers in a circular motion on the screen, as if you are turning a dial, until you hear the word "Actions". Then you can swipe up or down to cycle through the actions. Similarly, you can rotate back to the Adjust rotor, and swipe up or down to continue adjusting the value.