Prevent Voiceover from reading UIAccessibility accessibilityLabel

975 views Asked by At

I have a custom UIView subclass that displays text. The text can be in various languages, and I have audio for it. I don't want Voiceover to ever attempt to read the text itself, because I want the users to here my audio. I can set the accessibilityLabel of the element to an empty string, and play my audio in accessibilityElementDidBecomeFocused. However, I'm worried that this will be an issue for some users, because an alternative display wouldn't know how to display the text, the Item Chooser won't show the item, and I'm sure some other issues I haven't thought of.

Basically, I want to be able to give an accessibility element an accessibilityLabel, and have it be an active accessibilityElement, but NOT have VoiceOver read the label on focus.

2

There are 2 answers

0
Justin On

As far as I know, this is impossible using current APIs. While you can change content when VoiceOver is running, you cannot distinguish how that content will be presented to the user, whether through speech, Braille keyboard, or other means.

Consider filing an enhancement request with Apple.

0
Sean Howell On

I asked a similar question in [email protected] and it was pointed out to me that Voice Over users set their personal playback voice and speed. Replacing it with your own audio will likely have a detrimental effect.