Reputation: 5450
I have a UITextView containing a text that is meant for sighted users. I want to add a different non-sighted user-friendly text that will be read-out when VoiceOver is on. I tried adding it as an accessibilityLabel, but VoiceOver read both text. How can I make it read out just the accessible text when VoiceOver is on?
Upvotes: 2
Views: 1702
Reputation: 11
it read out just the accessible text when VoiceOver is on below code useful
UITextView.AccessibilityValue="Your Text";
In that You pass text which
Upvotes: 1
Reputation: 5671
I'm not sure it's possible to vocalize a text that's different from the displayed one using a UITextView with VoiceOver... anyway, I haven't found any solution for that.
VoiceOver is not only used by blind people but also by sight-impaired people which means that it's important to maintain a link between what's displayed and what's vocalized.
Using a UITextView means that its text will be vocalized besides the possible accessibility label you add.
If you want to make it read out just the accessible text when VoiceOver is on :
myTextView.text = "text to be adapted to the context."
Following these steps will allow you to reach your goal.
Upvotes: 0