matchifang
matchifang

Reputation: 5450

How to make VoiceOver read out a different text than what's in the UITextView?

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

Answers (2)

kevin patel
kevin patel

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

XLE_22
XLE_22

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 :

Following these steps will allow you to reach your goal.

Upvotes: 0

Related Questions