Melodius
Melodius

Reputation: 2785

VoiceOver in UITextView: read paragraph at a time

I'm developing a newspaper, magazine and book reading app for the visually impaired. Users of the app want VoiceOver to read the text in the UITextField a paragraph at a time and not read everything in one go. How can this be accomplished?

Upvotes: 1

Views: 1434

Answers (1)

MobA11y
MobA11y

Reputation: 18860

This is very simple actually. Any time you have a new paragraph, utilize a new UITextField view. This causes the "default" behavior to be scanning one paragraph of text at a time, which is very intuitive. While still allowing the "Line by Line" rotor setting to function as one line at a time. Which the UIAccessibilityReadingContent protocol would solution would not do.

NOTE: Another way to accomplish the same effect as multiple UITextFields is to utilize the UIAccessibilityContainer protocol to create synthetic Accessibility Views only scene by VoiceOver. Turning your one larger UITextField container, into multiple UIAccessibilityElements for accessibility purposes.

Though, if you have paging behavior, you SHOULD utilize the paging feature of this protocol. THIS would allow a user to read your collection of multiple UITextFields one page at a time.

To summarize, this approach allows users to:

  • Read One page at a time (by utilizing UIAccessibilityReadingContent)
  • Read one paragraph at a time (default behavior, with one paragraph per UITextField)
  • Read one line at a time (rotor: Line by Line)
  • Also, other rotor settings (Word and Character)

Seems solid to me!

Upvotes: 1

Related Questions