mobile accessibility - ios, android, mobile web

55
Mobile Accessibility Silicon Valley Code Camp, 2012 Ted Drake, Intuit Accessibility Saturday, October 6, 12 Police Dog, Tess, 29/1/35 / by Sam Hood http://www.flickr.com/photos/statelibraryofnsw/ 3210838977/

Upload: ted-drake

Post on 08-May-2015

4.859 views

Category:

Technology


5 download

DESCRIPTION

This presentation was developed for the Silicon Valley Code Camp 2012. It covers the accessibility features of today's latest operating systems, common problems, and coding solutions. This was created by Ted Drake as part of Intuit's series of technology speakers at SVCC 2012

TRANSCRIPT

Page 1: Mobile Accessibility - iOS, Android, Mobile Web

Mobile Accessibility

Silicon Valley Code Camp, 2012Ted Drake, Intuit Accessibility

Saturday, October 6, 12

Police Dog, Tess, 29/1/35 / by Sam Hood http://www.flickr.com/photos/statelibraryofnsw/3210838977/

Page 2: Mobile Accessibility - iOS, Android, Mobile Web

• 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: TinyURL.com/svcc-intuit

• This presentation: Slideshare.net/7mary4

• Photos from Flickr Commons

Saturday, October 6, 12

Huisvrouwengymnastiek / Gymnastics for housewives - http://www.flickr.com/photos/nationaalarchief/4397795679/

Page 3: Mobile Accessibility - iOS, Android, Mobile Web

What is Accessibility

Saturday, October 6, 12

Accessibility means removing barriers and giving people the tools they need to be independent.http://www.youtube.com/watch?v=iI_N5T3pmxQworld’s first double backflip on a wheelchair by Aaron “Wheelz” Fotheringham 8-26-2010

Page 4: Mobile Accessibility - iOS, Android, Mobile Web

What is Accessibility

Saturday, October 6, 12

Accessibility means removing barriers and giving people the tools they need to be independent.http://www.youtube.com/watch?v=iI_N5T3pmxQworld’s first double backflip on a wheelchair by Aaron “Wheelz” Fotheringham 8-26-2010

Page 5: Mobile Accessibility - iOS, Android, Mobile Web

Screen Reader

Saturday, October 6, 12

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, form inputs, 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.

http://www.flickr.com/photos/nationaalarchief/4192749083/ Bedbril / Glasses for reading in bed

Page 6: Mobile Accessibility - iOS, Android, Mobile Web

Braille

Saturday, October 6, 12

Young woman and man braille reading on park bench http://www.flickr.com/photos/center_for_jewish_history/4926954971/

Braille is a tactile alphabet for reading. Refreshable braille displays allow users to interact with their mobile devices via bluetooth. iOS and Android’s Jellybean support braille output.

Page 7: Mobile Accessibility - iOS, Android, Mobile Web

Cognitive Disabilities

Saturday, October 6, 12The direct interaction between finger and input has made mobile devices accessible to those with cognitive disabilities. Apps, such as schedule reminders, help those 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. http://www.flickr.com/photos/usnationalarchives/4727573694/

Page 8: Mobile Accessibility - iOS, Android, Mobile Web

Low Vision

Saturday, October 6, 12

Ice mask, C.T. Madigan, between 1911-1914 / photograph by Frank Hurley http://www.flickr.com/photos/statelibraryofnsw/2963668712/

The following slide is an interview with Karo Caran about using the iPad with low vision.

Page 9: Mobile Accessibility - iOS, Android, Mobile Web

Saturday, October 6, 12

Page 10: Mobile Accessibility - iOS, Android, Mobile Web

Saturday, October 6, 12

Page 11: Mobile Accessibility - iOS, Android, Mobile Web

Assistive CommunicationSaturday, October 6, 12

this child uses Proloque2Go to communicate with his parents. This app uses icons to build sentences and speak for the user. This replaces bulky, fragile equipment that can cost over $4,000http://www.youtube.com/watch?v=Tp2ROyyyqjo Toddler with apraxia Asking for Cheese and Cracker on Ipad with Proloquo2Go and ASL

Page 12: Mobile Accessibility - iOS, Android, Mobile Web

Assistive CommunicationSaturday, October 6, 12

this child uses Proloque2Go to communicate with his parents. This app uses icons to build sentences and speak for the user. This replaces bulky, fragile equipment that can cost over $4,000http://www.youtube.com/watch?v=Tp2ROyyyqjo Toddler with apraxia Asking for Cheese and Cracker on Ipad with Proloquo2Go and ASL

Page 13: Mobile Accessibility - iOS, Android, Mobile Web

Alternate Inputs

Saturday, October 6, 12

Switchman throwing a switch at C & NW RR's Proviso yard, Chicago, Ill. (LOC) http://www.flickr.com/photos/library_of_congress/2179192128/

Braille displays, single switches, and other alternative inputs can be enabled with mobile devices. Often times, the mobile device becomes the alternate input for other technology. iOS AssistiveTouch provides enhanced control of this functionality

Page 14: Mobile Accessibility - iOS, Android, Mobile Web

iOS - Android - Win8 - HTML5

Saturday, October 6, 12

August 2, 1933 http://www.flickr.com/photos/nlireland/6000735003/

Page 15: Mobile Accessibility - iOS, Android, Mobile Web

iOS

Saturday, October 6, 12LSE Sports Day, Apple Bobbing, May 1932 http://www.flickr.com/photos/lselibrary/4166786914/

Accessibility features are baked into every Apple device. VoiceOver is the core engine for translating user interactions between the app and the assistive technology.

Page 16: Mobile Accessibility - iOS, Android, Mobile Web

VoiceOver

Saturday, October 6, 12

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 and content.

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. - http://www.flickr.com/photos/national_archives_of_norway/5476890757/

Page 17: Mobile Accessibility - iOS, Android, Mobile Web

Hearing

Saturday, October 6, 12Apple 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 languagehttp://www.flickr.com/photos/usnationalarchives/3682406532/ Mary Stack, Once of East Boston, (Logan Airport Area) Now Lives Some 10 Miles North in Saugus

Page 18: Mobile Accessibility - iOS, Android, Mobile Web

Guided Access

Saturday, October 6, 12http://www.flickr.com/photos/uw_digital_images/4326185910/in/photostream/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 on a single task and away from angry birds.

Page 19: Mobile Accessibility - iOS, Android, Mobile Web

Android

Saturday, October 6, 12

Scrappo, mechanical scrap metal creation made by the Marion County salvage committee, Salem, Oregon, 1942 http://www.flickr.com/photos/osucommons/5764957371/

http://developer.android.com/guide/topics/ui/accessibility/apps.html

Page 20: Mobile Accessibility - iOS, Android, Mobile Web

Before Ice Cream Sandwich

Saturday, October 6, 12

http://www.flickr.com/photos/field_museum_library/3405449492/in/photostream/ Girl dressed like a bee74% 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 app accessible fortunately helps all versions.

Page 21: Mobile Accessibility - iOS, Android, Mobile Web

Ice Cream Sandwich

Saturday, October 6, 12

Members of the Donald Dannheim Family Who Operate a Dairy and Ice Cream Store - http://www.flickr.com/photos/usnationalarchives/4727559500/

ICS introduced touch navigation, web view, voice input, and font resizinghttp://developer.android.com/about/versions/android-4.0-highlights.html

Page 22: Mobile Accessibility - iOS, Android, Mobile Web

Jelly Bean

Saturday, October 6, 12

JB introduced gesture support and accessibility focus management, braille support, accessibility node APIs for custom views. Voice activated search is more powerful. http://developer.android.com/about/versions/jelly-bean.html

http://www.flickr.com/photos/statelibraryofnsw/6278391329/in/photostream/ New Zealand Kiwis perform haka before the match, n.d. by Sam Hood

Page 23: Mobile Accessibility - iOS, Android, Mobile Web

Windows 8

Saturday, October 6, 12

Petipa http://www.flickr.com/photos/george_eastman_house/3334085274/

Narrator provides touch navigation and other gestures. Zooming is built in. Should be able to install NVDA or JAWS on tablets, maybe phones. Waiting for more information. Uses UI Automation as the accessibility layer

Page 24: Mobile Accessibility - iOS, Android, Mobile Web

Mobile Web

Saturday, October 6, 12

http://www.flickr.com/photos/nasacommons/7876061882/ President Nixon welcomes the Apollo 11 astronauts aboard the U.S.S. HornetAudio, Video, HTML5 form types, ARIA, HTML5 web sites generally work well with mobile devices. Don’t overload with -webkit prefixes. Remember there will be other browsers (firefox, ie10)

Page 25: Mobile Accessibility - iOS, Android, Mobile Web

Get To WorkSaturday, October 6, 12

Plant : Consolidated/Convair Aircraft Factory San Diego http://www.flickr.com/photos/sdasmarchives/5018409455/

Page 26: Mobile Accessibility - iOS, Android, Mobile Web

Focus Control

Saturday, October 6, 12

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.

Page 27: Mobile Accessibility - iOS, Android, Mobile Web

iOS isAccessibilityElement

// if a UIView implements the container protocol, it cannot be an accessible element- (BOOL)isAccessibilityElement{    return NO;}

Saturday, October 6, 12

isAccessibility defines which elements are subject to focus. This is set by default for buttons and other actionable items. it needs to be configured with custom containers. Don’t set the parent to YES if there are actionable children.http://yaccessibilityblog.com/library/isaccessibility-ios-app.html

Page 28: Mobile Accessibility - iOS, Android, Mobile Web

Saturday, October 6, 12

This video shows the custom view used for a selector within Quickbooks Mobile. It’s the only thing that fails in this application.

Page 29: Mobile Accessibility - iOS, Android, Mobile Web

Saturday, October 6, 12

This video shows the custom view used for a selector within Quickbooks Mobile. It’s the only thing that fails in this application.

Page 30: Mobile Accessibility - iOS, Android, Mobile Web

AndroidsetFocusable() | isFocusable() | requestFocus()

<RelativeLayoutandroid:id="@+id/row_type"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_margin="2dp"android:focusable="true" >

Saturday, October 6, 12

Test your app by using a bluetooth keyboard. Can you access everything?Use the focus functions or set focusable at the layout level.

Page 31: Mobile Accessibility - iOS, Android, Mobile Web

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>

Saturday, October 6, 12

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.

Page 32: Mobile Accessibility - iOS, Android, Mobile Web

<div id="cb" role="checkbox"> Spam</div>

var checkbox = document.getElementById('cb');

checkbox.tabIndex = 0; // make the div focusable

checkbox.focus();

HTMLfocus()

Saturday, October 6, 12

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 first link.

Page 33: Mobile Accessibility - iOS, Android, Mobile Web

Don’t Touch

•touchstart•touchend•touchmove•touchcancel

Saturday, October 6, 12

• Screen readers intercept the touch events. You cannot depend on these events. You must provide alternate buttons. • JellyBean theoretically works by letting two fingers 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 finger is actually removed from the screen• Kersthazen voor verkeersagent http://www.flickr.com/photos/nationaalarchief/3118323158/

Page 34: Mobile Accessibility - iOS, Android, Mobile Web

Labels and Descriptions

Saturday, October 6, 12

Every non-standard button needs a labelMake sure concatenated content includes all information and it is easily understood.

Page 35: Mobile Accessibility - iOS, Android, Mobile Web

Custom Buttons

Saturday, October 6, 12

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

Page 36: Mobile Accessibility - iOS, Android, Mobile Web

Custom Buttons

Saturday, October 6, 12

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

Page 37: Mobile Accessibility - iOS, Android, Mobile Web

iOSaccessibilityLabel | accessibilityHint

quantity.accessibilityLabel =@”Quantity”;

quantity.accessibilityHint =@”Increase desired quantity.”;

Saturday, October 6, 12accessibilityLabel : A string that succinctly identifies 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.

https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIAccessibilityElement_Class/Reference/Reference.html

Page 38: Mobile Accessibility - iOS, Android, Mobile Web

AndroidcontentDescription

<ImageViewandroid: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" />

Saturday, October 6, 12

use contentDescription to provide labels for Android devices.use android:contentDescription = “@null”; for images that should be ignored.For EditText fields, provide an android:hint attribute instead of a content description, to help users understand what content is expected when the text field is empty. When the field is filled, TalkBack reads the entered content to the user, instead of the hint text.

Page 39: Mobile Accessibility - iOS, Android, Mobile Web

HTML<img alt=”GoPayment” ...>

<label for=”name”>Name</label>

<input title=”Search”...>

<input aria-label=”Area Code” aria-describedby=”phoneError” ...>

Saturday, October 6, 12

Use basic, semantic HTML first. 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 error message.

Page 40: Mobile Accessibility - iOS, Android, Mobile Web

Dynamic Values

Saturday, October 6, 12

When the user changes the quantity on this invoice, we want the user to know the subtitle has also changed. This is a common pattern where there are dynamic changes to a screen and we need to notify the user. This could also be for a dialog window, expanded menu, etc.

Page 41: Mobile Accessibility - iOS, Android, Mobile Web

iOSUIAccessibilityPostNotification

-(void)helpDidClose:(ZBEHelpView *)view{     [helpView removeFromSuperview];     helpView = nil;     [self unease];

     UIAccessibilityPostNotification (          UIAccessibilityScreenChangedNotification,          statusView);          // statusView instead of nil tells this where to place the focus.}

Saturday, October 6, 12

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 https://developer.apple.com/videos/wwdc/2012/#210

Page 42: Mobile Accessibility - iOS, Android, Mobile Web

AndroidAccessibilityEvent

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); }

Saturday, October 6, 12

an AccessibilityEvent is created whenever you select an item or change focus in your UI.more info: http://developer.android.com/training/accessibility/accessible-app.html#events

use announceForAccessibilityCompat to get built in backwards compatibilityGoogle has provided a great package of inaccessible/accessible code to learn more.https://code.google.com/p/eyes-­‐free/downloads/detail?name=accessibility_codelab_demos_v2_src.zip

Page 43: Mobile Accessibility - iOS, Android, Mobile Web

HTMLaria-live

<div aria-live=”polite”> Total is $5.10</div>

Saturday, October 6, 12

aria-live alerts the user when the content within the container’s value changes. Polite waits until the user pauses, assertive announces the change immediately. Fine tune with aria-atomic, aria-relevant, and aria-channelhttp://lists.w3.org/Archives/Public/www-archive/2008May/att-0031/WAI-ARIA_Best_Practices_StructNav.html#LiveRegions

Page 44: Mobile Accessibility - iOS, Android, Mobile Web

More Stuff

Saturday, October 6, 12

McCall Homemaking Cover http://www.flickr.com/photos/george_eastman_house/3122870171/

Page 45: Mobile Accessibility - iOS, Android, Mobile Web

accessibilityViewIsModal (iOS5)A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.

Saturday, October 6, 12

https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIAccessibility_Protocol/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008786Your only option in 4.3 is to iterate the entire sub-tree setting isAccessibilityElement = NO

Page 46: Mobile Accessibility - iOS, Android, Mobile Web

accessibilityPerformEscapeImplement 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.

Saturday, October 6, 12https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIAccessibilityAction_Protocol/Introduction/Introduction.html

override  accessibilityPerformEscape  on  custom  back  button

The iPad does not use a standard back button in the top left of the screen. Allow the user to perform a scrub gesture to move back.

Page 47: Mobile Accessibility - iOS, Android, Mobile Web

Detect Screen Reader

iOSUIAccessibilityIsVoiceOverRunning();

AndroidisScreenReaderActive()

Saturday, October 6, 12

This information could be passed from the native app to webview if you need to provide alternate 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.http://code.google.com/p/eyes-free/source/browse/trunk/shell/src/com/google/marvin/shell/HomeLauncher.java?spec=svn623&r=623https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/c/func/UIAccessibilityIsVoiceOverRunning

Page 48: Mobile Accessibility - iOS, Android, Mobile Web

Saturday, October 6, 12

This video shows how to use the Android Lint tool to find accessibility problems and fix them quickly. on YouTube: http://youtu.be/OtwCe-YlD5k

Page 49: Mobile Accessibility - iOS, Android, Mobile Web

Don’t Hide Your Fixes

Saturday, October 6, 12

Tell users when you make an improvement to accessibility in your release notes. Preferably what part was fixed. 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 http://www.flickr.com/photos/statelibraryofnsw/2960116125/

Page 50: Mobile Accessibility - iOS, Android, Mobile Web

Turn on the screen reader

Saturday, October 6, 12

Woman reading http://www.flickr.com/photos/nationalmediamuseum/2780164461/

The following slides will show how to enable screen reader on iOS and Android

Page 51: Mobile Accessibility - iOS, Android, Mobile Web

Enable VoiceOver

Saturday, October 6, 12

Open settings.Choose GeneralScroll down to Accessibility

Page 52: Mobile Accessibility - iOS, Android, Mobile Web

Enable VoiceOver

Saturday, October 6, 12

Scroll down and select Triple-click Home Choose VoiceOver and go back to Accessibility SettingsExplore the accessibility optionsNow you can triple click the home button to enable disable VoiceOver.Victor Tsaran provides a good intro to using VoiceOver http://www.youtube.com/watch?v=t60voPIY5xY

Page 53: Mobile Accessibility - iOS, Android, Mobile Web

Enable TalkBack

Saturday, October 6, 12

Open SettingsSelect AccessibilitySelect TalkBack

Page 54: Mobile Accessibility - iOS, Android, Mobile Web

Enable TalkBack

Saturday, October 6, 12

select the on/off switch and choose okGo back to Accessibility and choose Install web scripts (ICS) or Enhance Web Accessibility (Jelly Bean)

Page 55: Mobile Accessibility - iOS, Android, Mobile Web

Ted Drake@ted_drake

Last-Child.com

Saturday, October 6, 12