iOS7 Accessibility

This presentation was created for the Mobile+Web Developer Conference in San Francisco, Jan. 2014

iOS 7 Accessibility from Ted Drake

What is accessibility?

This short video by Tommy Edison shows how accessible applications are used by screen reader users. In this instance, he is able to quickly take a photo and share it on Instagram.

Screen Reader

Screen reader software, such as VoiceOver, TalkBack, or Narrator provide an interface between the user and the application. The SR interprets the user’s gestures and the application’s output. Gestures are unique to screen reader usage, this can be surprising for custom gestures that detect onTouch events.

iPhone App User
Typically a user interacts directly with the phone
iPhone VoiceOver App User
With VoiceOver and other screen readers, the user interacts with VoiceOver. VoiceOver interprets the user’s input and passes it to the application. The application returns a result, which is passed back to the user in their preferred output, such as voice.
iPhone VoiceOver Automated Testing Server
VoiceOver doesn’t care who the user is. You can even use it to run automated testing. VoiceOver is your programable tool to the application’s functionality.

Siri: Turn on VoiceOver

Siri welcome screen VoiceOver is very easy to use. Simply ask Siri to turn on voiceover. You can also ask her to turn it off. For quicker access, go into settings>general>accessibility>accessibility shortcut and select

Focus & Double Tap

VoiceOver’s gestures are quite simple, swipe with one finger to move from element to element. Use touch exploration to discover what is on a screen. VoiceOver will announce what has been focused. Double tap to activate whatever is focused. Learn more with a four finger double tap
Touch navigation on iOS (.mov)

What’s new in iOS7

  • Dynamic Type
  • Safari Viewport
  • Simplification
  • Blur and Low Contrast
  • Switch Control
  • Guided Access
  • Speech Synthesis
  • Hand Writing
  • Magic Tap (iOS6)

Dynamic Type

Dynamic Type is part of UIFont. Choose the purpose of your text and allow iOS to control its proportional size. For instance, choose heading, body, table cell Headline, SubHeadline, Body, Footnote, Caption1, Caption2

Dynamic Type message.label.font = [UIFont preferredFontForTextStyle: UIFontTextStyleHeadline ]; 
self.label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];

Listen for the font size change, this allows the type to be resized when the user changes their preference. More information:

Safari Viewport

Good:
<meta name="viewport" content="width=device-width"<
Bad:
<meta name="viewport" content="initial-scale=2.3, user-scalable=no">

Safari for iOS7 has a different layout and treats the viewport differently. You don’t need to disable user-scalable. Just use the basic viewport settings. Safari ViewPort Specifications

Simplification

Replace buttons with text = good thing. Replacing buttons with icons = some good, some bad. Be consistent, don’t re-invent the icons. Give icons a label.

Thin fonts on blurred backgrounds can make your text unreadable for all users, let alone those with low vision. Consider using system fonts to allow user settings. Consider how your text will look with a light and dark background. 4.5:1 is the required ratio for contrast. Does your tint color provide this? iOS UI Guidelines

Switch Control

Stephen Hawking NASA 50th (200804210010HQ) iOS7 introduced Switch Control, which provides an interface to all elements of a page, using just a single tap on the phone or external switch. It can also track head movements. Switch Control can also be used to see what elements in your application receive focus.

Guided Access

Guided Access started as a method for care givers to disable sections of applications and devices for people with autism, ADD, and other cognitive disabilities. It is now available to developers. You define roles and the availability of elements within those roles. for example, only show a delete button for editors. Only show options available for a location, i.e. Clover brewing at Starbucks. iOS Guided Access API specification Custom restrictions are represented by string identifiers provided by the developer in the guidedAccessRestrictionIdentifiers method

Guided Access API

- (NSArray *)guidedAccessRestrictionIdentifiers { return @[ ControlsRestrictionId ]; } 
- (NSString *)textForGuidedAccessRestrictionWithIdentifier: (NSString *)restrictionId { return @”Controls”; } 
- (NSString *)detailTextForGuidedAccessRestrictionWithIdentifier: (NSString *)restrictionId { return @”Adjust floor down/up”; }  

This sample code comes from the WWDC 2013 presentation: Accessibility in iOS

Speech Synthesis – AVSpeechSynthesizer

The AVSpeechSynthesizer class produces synthesized speech from text on an iOS device, and provides methods for controlling or monitoring the progress of ongoing speech. Access the text to speech engine, you can also can define language and monitor the status. Use this to create a speech option on your pages for non VoiceOver users.

Text to Speech API

AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init]; 
AVSpeechUtterance *utterance = [AVSpeechUtteranceWithString: @"Hello!"]; 
[speechSynth speakUtterance:utterance]; 
 

Handwriting with VoiceOver

VoiceOver users can now use handwriting directly on the phone’s surface for search or to write content within an input. Watch for this to be expanded in ios8 for all users. Handwriting navigation on iOS7 (.mov)

Magic Tap

- (BOOL)accessibilityPerformMagicTap 

Two-fingered double tap while using VoiceOver activates the key function on the screen.

  • Take photo
  • Start stopwatch
  • Hangup phone call

The exact action performed by this method depends your app, typically toggling the most important state of the app. For example, in the Phone app it answers and ends phone calls, in the Music app it plays and pauses playback, in the Clock app it starts and stops a timer, and in the Camera app it takes a picture.

isAccessibilityElement: Should an element receive focus?

isAccessibilityElement can be chosen via interface builder or programatically. Make sure this is set to yes for actionable items. Set it to false on parent containers when their children are actionable, i.e. UITableViewCell

Setting a UITableView to isAccessibilityElement
Typically you will not set isAccessibilityElement to true on a UITableView. But if you want this to act as a single actionable item, set this to true.
Setting isAccessibilityElement on a UITableViewCell
This is the default behavior in iOS and you shouldn’t need to set these values.
setting a UITableViewCell's content to have isAccessibilityElement
If your UITableViewCell has actionable items, set the cell to NO and place YES on the individual images. This is also commonly seen when a Webview is given focus instead of the website within it.

This video of Chris Fleizach’s presentation at Stanford University shows how to enable accessibility via Interface Builder. Please watch this complete video, it is one of the best resources for accessiblity on iOS.


Posted

in

, ,

by

Comments

2 responses to “iOS7 Accessibility”

  1. Richard Avatar
    Richard

    You folks might be interested in this blog post http://www.marcozehe.de/2014/02/07/switching-back-to-windows/

  2. Ted Avatar

    Keep in mind, Marco is discussing VoiceOver support on OSX. The accessibility of iOS is still high and one can hope that iOS8 will solve issues introduced by iOS7 and introduce new features, such as switch control.

Leave a Reply

Your email address will not be published. Required fields are marked *