I am writing an app for people with blindness and would like to put some instruction on its home page. The instruction is a multi-paragraph static text piece. I put it in a UITextView.
I would like blind users to be able to read the instruction paragraph by paragraph using VoiceOver. However, when users move VoiceOver focus onto the UITextView, VoiceOver always read the instruction as a whole piece. My devices are iPad 2 and iPhone 5s with iOS 7.
So, is there any way I can set up my UITextView so that VoiceOver users can read the text piece paragraph by paragraph? If that is impossible with a UITextView, what are some other options? Do I really have to use a UITableView?
Thank you!
Joe
VoiceOver users, not you, determine how much text is read at once. You could override this by subclassing
UITextView
and implementing theUIAccessibilityContainer
informal protocol. However, this would be unintuitive for VoiceOver users so I recommend you avoid it. Some VoiceOver users can listen to lots of text read extremely quickly, and it would be frustrating for them if you artificially forced the reading to stop between paragraphs.TTTAttributedLabel
, an open-source label library that supports hyperlinking, overrides these methods to make links accessible. You may wish to review the relevant source code if you decide to proceed with this implementation against my advice.The easiest solution : just a rotor item to be selected and used when appropriate.
VoiceOver users know this gesture, the only thing to be done by the developper is a perfect formatting of the UITextView content.
I created a blank application with the code snippet hereafter :
Follow the steps hereunder to read the UITextView content paragraph by paragraph :
Lines
item to be displayed automatically when appropriate.Lines
item.Now, if you think that the users won't know this gesture (weird but possible), you can :
UIAccessibilityContainer
protocol by splitting your UITextView content into as manyUIAccessibilityElement
as paragraphs you want.If many pages are at stake, take a look at the
UIAccessibilityReadingContent
that should help you to read one page at a time.Up to you to get the solution that suits you best.