I gave this presentation at the Silicon Valley Code Camp about mobile accessibility. I tried to reach all audiences by showing what can be done with mobile technology for accessibility, how the operating systems stack up, and the common problems with solutions. I also included instructions on enabling the screen reader for iOS and Android.
Transcript
-
Mobile Accessibility
Silicon Valley Code Camp, 2012 Ted Drake, Intuit Accessibility
Police Dog, Tess, 29/1/35 / by Sam Hood - Visit the Intuit booth in courtyard for munchies and win Bose Headphones • Intuit is a GREAT place to work. No Kool-Aid needed • Intuit at SVCC • This presentation: Slideshare.net/7mary4 • Photos from Flickr Commons Huisvrouwengymnastiek / Gymnastics for housewives
-
What is Accessibility
Accessibility means removing barriers and giving people the tools they need to beindependent.http://www.youtube.com/watch?v=iI_N5T3pmxQworld’s ï¬rst double backflip on a wheelchair by Aaron “Wheelz†Fotheringham 8-26-2010
-
Screen Reader
Screen readers are more than a text to speech engine.They analyze the page/screen and create their own version of the structure. which allows the user to navigate via headers, forminputs, landmarks, etc.Popular screen readers are Narrator for windows 8, VoiceOver for Mac, TalkBack and ChromeVox for Android.JAWS and NVDA are for windows desktop and should be available for Win8 mobile tablet. Bedbril / Glasses for reading in bed
-
Braille
Young woman and man braille reading on park bench Braille is a tactile alphabet for reading. Refreshable braille displays allow users to interactwith their mobile devices via bluetooth. iOS and Android’s Jellybean support braille output.
-
Cognitive Disabilities
The direct interaction between ï¬nger and input has made mobile devices accessible to those with cognitive disabilities. Apps, such as schedule reminders, helpthose with memory loss due to traumatic brain injury.Guided Access for iOS6 allows the user to focus on using only one app at a time. Good for ADD and cognitive disabilities.Mobile apps in general are more focused and task oriented.Tricycle Club of the Century Village Retirement Community Meets Each Morning.
-
Low Vision
Ice mask, C.T. Madigan, between 1911-1914 / photograph by Frank Hurley Interview with Karo Caran about using the iPad with low vision.
-
Assistive Communication
this child uses Proloque2Go to communicate with his parents. This app uses icons to buildsentences and speak for the user. This replaces bulky, fragile equipment that can cost over $4,000 Toddler with apraxia Asking for Cheese and Cracker on Ipad with Proloquo2Go and ASL
-
Alternate Inputs
Switchman throwing a switch at C & NW RRs Proviso yard, Chicago, Ill. (LOC) Braille displays, single switches, and other alternative inputs can be enabled with mobile devices. Often times, themobile device becomes the alternate input for other technology. iOS AssistiveTouch provides enhanced control ofthis functionality
- iOS – Android – Win8 – HTML5 August 2, 1933
-
iOS
LSE Sports Day, Apple Bobbing, May 1932 Accessibility features are baked into every Apple device. VoiceOver is the core engine for translating user interactions between the app and the assistivetechnology.
-
VoiceOver
VoiceOver is more than a screen reader. It’s a layer that acts as a middle layer between the user and app. It interprets gestures andcontent.It also can be used by automated testing to replace the user with scripts. Accessibility -> automated testing Erik Bye og Otto Nilsen i radio studio 13. mars 1958. –
-
Hearing
Apple is now certifying hearing aids to provide digital audio experience and minimal radio interferencesome apps are now using the phone to detect sound and act as “ears†for users.Skype, face to face and other apps allow people to communicate via sign language Mary Stack, Once of East Boston, (Logan Airport Area) Now Lives Some 10 Miles North inSaugus
-
Guided Access
Climbing guide Fairman B. Lee with a party of hikers on Nisqually Glacier, Mount Rainier Guided Access allows the user to close off certain parts of apps to minimize distractions. This is useful for autism, ADD, and classrooms to keep people focused ona single task and away from angry birds.
-
Android
Android Developer Network: Creating Accessible Apps Scrappo, mechanical scrap metal creation made by the Marion County salvage committee, Salem,Oregon, 1942
-
Before Ice Cream Sandwich
Girl dressed like a bee 74% of users are still on pre-ICS phones.Honeycomb and other pre-ICS versions have minimal accessibility support. DPad focus control is critical. Making your appaccessible fortunately helps all versions.
- Ice Cream Sandwich- ICS introduced touch navigation, web view, voice input, and font resizing. Ice Cream Sandwich release notes and features Members of the Donald Dannheim Family Who Operate a Dairy and Ice Cream Store
-
Jelly Bean
JB introduced gesture support and accessibility focus management, braille support, accessibility node APIs for custom views.Voice activated search is more powerful. Jelly Bean release notes and features New Zealand Kiwis perform haka before thematch, n.d. by Sam Hood
-
Windows 8
Petipa Narrator provides touch navigation and other gestures. Zooming is built in. Should be able toinstall NVDA or JAWS on tablets, maybe phones. Waiting for more information. Uses UIAutomation as the accessibility layer
-
Mobile Web
Audio, Video, HTML5 form types, ARIA,HTML5 web sites generally work well with mobile devices.Don’t overload with -webkit preï¬xes. Remember there will be other browsers (ï¬refox, ie10) President Nixon welcomes the Apollo 11 astronauts aboard the U.S.S. Hornet
- Get To Work Plant : Consolidated/Convair Aircraft Factory San Diego
-
Focus Control
Every action item in your app must be focusable and clickable.Flickr photo app for iOS. Currently the rows are focusable, but not the individual thumbnails.
-
iOS
isAccessibilityElement // if a UIView implements the container protocol, it cannot be an accessible element -
(BOOL)isAccessibilityElement {
return NO;
}
isAccessibility deï¬nes which elements are subject to focus. This is set by default for buttonsand other actionable items. it needs to be conï¬gured with custom containers. Don’t set the parent to YES if there are actionable children. isAccessibilityElement usage - This video shows the custom view used for a selector within Quickbooks Mobile. It’s the only thing that fails in this application.
-
Android setFocusable() | isFocusable() | requestFocus()
Test your app by using a bluetooth keyboard. Can you access everything? Use the focus functions or set focusable at the layout level. -
HTML5 <a> & <button>
Best: <button>Share This</button>
Good: <a href=â€#sharethis†role=â€buttonâ€>Share This</a>
Works, but avoid: <div role=â€button†tabindex=â€0â€>Share This</div>Use the a for links. Use button for actions.use role=â€button†if you need to use a link to trigger an action.use tabindex=â€0†on non-links or buttons, such as a div.tabindex=â€-1†allows an item to receive focus via JS, but is not in the normal tab flow.the javascript for div will still need to recognize the onclick event, not mouse events.
-
HTML focus()
<div id="cb" role="checkbox"> Spam</div>
var checkbox = document.getElementById(cb); checkbox.tabIndex = 0; // make the div focusable checkbox.focus();
set focus with JavaScriptThis is the same approach needed to let the user know a portion of the screen has changed.For instance, if a dropdown menu appears, place focus on the ï¬rst link. -
Don’t Touch – touchstart, touchend, touchmove, touchcancel
• Screen readers intercept the touch events. You cannot depend on these events. You must provide alternate buttons. • JellyBean theoretically works by letting two ï¬ngers be interpreted as a single touch • iOS provides a gesture event, but it is not supported on other devices. • Finger is placed on the screen • Finger is removed from the screen • Finger is moved across the screen • Touch is cancelled before the ï¬nger is actually removed from the screen • Kersthazen voor verkeersagent
-
Labels and Descriptions
Every non-standard button needs a labelMake sure concatenated content includes all information and it is easily understood.
-
Custom Buttons
This short video shows how the buttons are not labeled on the Southwest Airlines app. Sadly,this video is almost two years old and the app is still missing labels.http://www.youtube.com/watch?v=StI0iIufJzk
-
iOS accessibilityLabel | accessibilityHint
quantity.accessibilityLabel = @â€Quantityâ€;
quantity.accessibilityHint = @â€Increase desired quantity.â€;
accessibilityLabel : A string that succinctly identiï¬es the accessibility element.accessibilityHint: A string that briefly describes the result of performing an action on the accessibility element.These can be set in Interface builder as well .UIAccessibility documentation on Apple Developer Network -
Android contentDescription
<ImageView
android:id="@+id/local_deals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription= "@string/local_deals"
android:focusable="true"
android:src="@drawable/ic_menu_local" />
use contentDescription to provide labels for Android devices.
use android:contentDescription = “@nullâ€; for images that should be ignored.
For EditText ï¬elds, provide an android:hint attribute instead of a content description, to help users understand what content is expectedwhen the text ï¬eld is empty. When the ï¬eld is ï¬lled, TalkBack reads the entered content to the user, instead of the hint text. -
HTML
<img alt=â€GoPayment†...>
<label for=â€nameâ€>Name</label>
<input title=â€Searchâ€...> <input aria-label=â€Area Code†aria-describedby=â€phoneError†...>
Use basic, semantic HTML ï¬rst.title attribute on input can work if you want to hide the labelaria-label works well when breaking up the text inputsaria-describedby points to a text container that describes the input, such as an errormessage. - . Dynamic Values
When the user changes the quantity on this invoice, we want the user to know the subtitlehas also changed. This is a common pattern where there are dynamic changes to a screenand we need to notify the user. This could also be for a dialog window, expanded menu, etc. -
iOS UIAccessibilityPostNotiï¬cation
-(void)helpDidClose:(ZBEHelpView *)view {
[helpView removeFromSuperview];
helpView = nil;
[self unease];
UIAccessibilityPostNotification (
UIAccessibilityScreenChangedNotification,
statusView);
// statusView instead of nil tells this where to place the focus.
}
iOS6 allows you to notify a screen has changed, and place focus on that element.use UIAccessibilityLayoutChangedNotification for small changes. See WWDC 2012 Accessibility for iOS for the demo of this code -
Android AccessibilityEvent
private void announceForAccessibilityCompat(CharSequence text) {
if (!mA11yManager.isEnabled()) {
return;
}
final int eventType;
if (Build.VERSION.SDK_INT < 16) { eventType = AccessibilityEvent.TYPE_VIEW_FOCUSED; } else { eventType = AccessibilityEventCompat.TYPE_ANNOUNCEMENT; } final AccessibilityEvent event = AccessibilityEvent.obtain(eventType); event.getText().add(text); event.setClassName(AccessibleCanvas.class.getName()); event.setPackageName(mContext.getPackageName()); mA11yManager.sendAccessibilityEvent(event); }
an AccessibilityEvent is created whenever you select an item or change focus in your UI.more info: announceForAccessibilityCompat to get built in backwards compatibility Google has provided a great package of inaccessible/accessible code to learn more. -
HTML aria-live
<div aria-live=â€politeâ€> Total is $5.10 </div>
aria-live alerts the user when the content within the container’s value changes. Polite waitsuntil the user pauses, assertive announces the change immediately.Fine tune with aria-atomic, aria-relevant, and aria-channel -
More Stuff
-
accessibilityViewIsModal (iOS5)
A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. Your only option in 4.3 is to iterate the entire sub-tree setting isAccessibilityElement = NO Apple Developer Network documentation
-
accessibilityPerformEscape
Implement this method on an element or containing view that can be revealed modally or in a hierarchy. When a VoiceOver user performs a dismiss action, this method dismisses the view. the popover.
override accessibilityPerformEscape on custom back buttonThe iPad does not use a standard back button in the top left of the screen. Allow the user toperform a scrub gesture to move back. -
Detect Screen Reader
iOS UIAccessibilityIsVoiceOverRunning(); Android isScreenReaderActive()
This information could be passed from the native app to webview if you need to providealternate content.This is helpful for skipping annoying gesture introduction screens.This is NOT possible in desktop browsers.You can also test for closed captions are enabled or mono audio. Android TalkBack running documentation and Is VoiceOver Running documentation - This video shows how to use the Android Lint tool to ï¬nd accessibility problems and ï¬x them quickly. on YouTube:
-
Don’t Hide Your Fixes
Tell users when you make an improvement to accessibility in your release notes. Preferably what part was ï¬xed. They want to know when things are better and will tell their friends. Ice cased Adelie penguins after a blizzard at Cape Denison / photograph by Frank Hurley
-
Turn on the screen reader
Woman reading The following slides will show how to enable screen reader on iOS and Android
-
Enable VoiceOver
Open settings > Choose General > Scroll down to Accessibility
- Enable VoiceOver Scroll down and select Triple-click Home > Choose VoiceOver and go back to Accessibility Settings. Explore the accessibility option. sNow you can triple click the home button to enable disable VoiceOver.Victor Tsaran provides a good intro to using VoiceOver
-
Enable TalkBack
Open Settings > Select Accessibility > Select TalkBack
- Enable TalkBack select the on/off switch and choose ok > Go back to Accessibility and choose Install web scripts (ICS) or Enhance Web Accessibility(Jelly Bean)
- Ted Drake @ted_drake Last-Child.com
Leave a Reply