Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UISlider accessibility traits for VoiceOver?

What are are the proper UIAccessibility traits and handlers required to make a UISlider usable with VoiceOver enabled?

Are there any descriptions of how a user might use a UISlider with VoiceOver enabled?

like image 716
hotpaw2 Avatar asked Dec 09 '25 15:12

hotpaw2


1 Answers

Here's what I ended up adding to a UISlider for VoiceOver accessibility:

[ mySlider setIsAccessibilityElement:YES ];
[ mySlider setAccessibilityLabel:@"This slider controls blah blah etc...." ];

And in the target method for the control event UIControlEventValueChanged:

[ mySlider setAccessibilityValue = [ NSString stringWithFormat:@"Blah blah is set to %3.1f", mySlider.value];

With VoiceOver enabled, this slider then spoke the new value as I swiped up and down (not back and forth) over it after setting the focus to that slider.

like image 54
hotpaw2 Avatar answered Dec 11 '25 04:12

hotpaw2



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!