SlideShare a Scribd company logo
1 of 29
Download to read offline
Google Confidential and Proprietary
Designing Accessible
Android Applications
April 9, 2013
Google Confidential and Proprietary
Agenda
● What is accessibility?
● What features are available?
● How do you make your app accessible?
● Testing and Debugging
Google Confidential and Proprietary
Google Confidential and Proprietary
What framework provides
● User interactions and system events generate
AccessibilityEvents and send them to services
● AccessibilityServices like TalkBack respond to
these events and provide feedback to the user
Google Confidential and Proprietary
What framework provides
Donut (1.6) through Honeycomb (3.x)
● Spoken feedback through TextToSpeech APIs
● Modify your device's display and sound options
○ Large text
○ Change speed at which text is spoken
○ Disable screen rotation
Ice Cream Sandwich (4.0)
● Touch exploration for devices without D-Pad
● Services can inspect view hierarchy
Google Confidential and Proprietary
What framework provides
JellyBean (4.1)
● Supports Accessibility focus
○ Services can place this focus
on any view
○ Indicated on-screen via
yellow rectangle
● Supports Braille I/O devices
via BrailleBack service
Google Confidential and Proprietary
What framework provides
JellyBean (4.1)
● Many actions available
○ Move input focus
○ Click on views
○ Scroll within views
○ Navigate text by words, etc.
○ Perform global actions
Google Confidential and Proprietary
Features in Jelly Bean
Gestures
● Services can respond to user-
drawn gestures
○ Perform accessibility actions
○ Invoke global actions (Home,
Back, etc.)
● Deterministic access to
screen content
Google Confidential and Proprietary
Features in Jelly Bean
Magnification
● Available in Android 4.2
● Multiple zoom modes
○ Triple-tap to toggle
○ Triple-tap and hold for
momentary zoom
Google Confidential and Proprietary
Features in Jelly Bean
Gestures
● Quick shortcuts available in
Global Context Menu
○ Pause feedback
○ Repeat/spell last utterance
○ TalkBack Settings
Google Confidential and Proprietary
(demo)
Google Confidential and Proprietary
What framework provides
Android sensors
● SMS, Video chats, Videos with Captions
● Location aware, GPS, maps, places
● proximity
● eyes free - motion / accelerometer / velocity tracker / light sensor
● motion, environmental and position sensors
Read the Android Developer Guide for Sensors
Google Confidential and Proprietary
What framework provides
Google Play
● Paid apps in many Countries
● DCB
Developer Console
● Countries and currencies
● Auto Translate feature
● Statistics
Global accessibility
● i18n and l10n
Read the Android Developer Guide for Localization
Google Confidential and Proprietary
What framework provides
Design recommendations
● Navigation should be easy
● Use recommended touch target sizes
● Alternatives to time-out controls
● Label UI elements meaningfully
○ Minimize Chatter
○ Provide feedback
Read the Android Design Guide for Accessibility
Google Confidential and Proprietary
(demo)
Google Confidential and Proprietary
Code changes for Accessibility
Labeling content
● Controls without text need android:contentDescription
● Android Lint tool warns when images are missing descriptions
● Purely decorative Views should set android:
contentDescription="@null"
● Use setContentDescription() to update a View's description
○ Don't override getContentDescription()
● EditTexts should use android:hint
Google Confidential and Proprietary
<ImageView android:id="@+id/rounded_corner"
android:contentDescription="@null"
... />
<ImageView android:id="@+id/search_button"
android:focusable=”true”
android:contentDescription="@string/search"
... />
<EditText android:id="@+id/search_field"
android:hint="@string/search_hint"
... />
Google Confidential and Proprietary
Code changes for Accessibility
Supporting D-Pad navigation
● Prior to Android 4.0, app needs to be accessible via D-Pad
○ Includes arrow keys on USB and Bluetooth keyboards
○ This is easy to test in the emulator!
● May need to manually specify that clickable items (e.g.
ImageViews) are focusable using android:focusable="true"
● Make important text focusable
● Control order using android:nextFocusDown
Google Confidential and Proprietary
<LinearLayout android:orientation="horizontal"
... >
<EditText android:id="@+id/edit"
android:focusable=”true”
android:nextFocusDown=”@+id/text”
... />
<TextView android:id="@+id/text"
android:focusable=”true”
android:text="@string/terms_of_service"
android:nextFocusUp=”@id/edit”
... />
</LinearLayout>
Google Confidential and Proprietary
Code changes for Accessibility
Supporting scaled text
● Android supports large fonts for low-vision use
● Text sizes should be in sp "scaled pixels" instead of dips
● Always test your app for text cropping, wrapping, etc.
○ You should be doing this for i18n anyway!
<TextView android:id="@+id/intro_text"
android:textSize="14sp"
.... />
Google Confidential and Proprietary
(demo)
Google Confidential and Proprietary
Logical grouping and ordering
● View hierarchy order and on-screen positioning determine grouping
for accessibility focus and ordering of spoken feedback
● Group non-focusable items (e.g. TextViews) in a focusable
container to have them read as a single item
● Set content description on a container to override automatic
grouping and ordering of contained items
Google Confidential and Proprietary
Logical grouping and ordering
Google Confidential and Proprietary
FolderIcon android:id="@+id/folder"
android:focusable="true"
android:contentDescription="@string/folder_google"
...>
<ImageView android:id="@+id/preview_background"
android:contentDescription="@null"
... />
<BubbleTextView android:id="@+id/folder_icon_name"
android:text="@string/google"
... />
</LinearLayout>
Google Confidential and Proprietary
Testing and Debugging for Accessibility
For all Android apps
○ Create checklist
○ Check with real simulation
○ Test on all supported Platforms
○ Test on screens and densities
Screens: small, normal, large, xlarge
Densities: (low (ldpi), medium (mdpi), high (hdpi),
extra high (xhdpi))
Google Confidential and Proprietary
Testing and Debugging for
Accessibility
For all Android apps
● Enable Accessibility features
○ Turn on TalkBack logging in
Accessibility > TalkBack >
Settings > Developer
settings
● Android Lint tool
Google Confidential and Proprietary
Summary
Must do:
● Use built-in Android components
○ Label controls
○ Make controls focusable
○ Ensure traversal order is correct
○ Specify text in sp
○ Logically group UI elements
● Fix custom components
○ Implement accessibility interfaces
○ Use Support library
○ TouchExplorationHelper is available on Google Code
● Test and Fix
Google Confidential and Proprietary
Summary
Good to have:
● Augment audio-only prompts
○ Visual cues
○ Haptic feedback
● Evaluate sensors
● Add captions to videos
● Follow UI guidelines
● Reach globally
Read the Android Developer Guide for Accessibility
Google Confidential and Proprietary
Thanks and Questions?
Send feedback to:
soniash@google.com

More Related Content

Similar to Android accessibility 9th_april_droidcon

Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackSunita Singh
 
Mobile Web Rock
Mobile Web RockMobile Web Rock
Mobile Web RockIdo Green
 
GDCS - Introduction to Google Products and Technologies.pptx
GDCS - Introduction to Google Products and Technologies.pptxGDCS - Introduction to Google Products and Technologies.pptx
GDCS - Introduction to Google Products and Technologies.pptxGoogleDeveloperStude25
 
Introduction to Cloud Computing and Google Cloud Platform.
Introduction to Cloud Computing and Google Cloud Platform.Introduction to Cloud Computing and Google Cloud Platform.
Introduction to Cloud Computing and Google Cloud Platform.vriddhigupta
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopKasun Dananjaya Delgolla
 
Getting started with cloud
Getting started with cloudGetting started with cloud
Getting started with cloudpalakmantry
 
A Kickstart to Google Cloud
A Kickstart to Google CloudA Kickstart to Google Cloud
A Kickstart to Google CloudGDSCDJSCE
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...DicodingEvent
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform UpdateIdo Green
 
Trending Time on Google Glass - see what everyone's buzzing about
Trending Time on Google Glass - see what everyone's buzzing aboutTrending Time on Google Glass - see what everyone's buzzing about
Trending Time on Google Glass - see what everyone's buzzing aboutJason Salas
 
Android App Development - 01 Introduction
Android App Development - 01 IntroductionAndroid App Development - 01 Introduction
Android App Development - 01 IntroductionDiego Grancini
 
Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"IT Event
 
Delegating user tasks in applications
Delegating user tasks in applicationsDelegating user tasks in applications
Delegating user tasks in applicationsFriedger Müffke
 
How browser accessibility can enhance safe driving (AGL Summit Nov 2020)
How browser accessibility can enhance safe driving (AGL Summit Nov 2020)How browser accessibility can enhance safe driving (AGL Summit Nov 2020)
How browser accessibility can enhance safe driving (AGL Summit Nov 2020)Igalia
 
YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5SMART DevNet
 
Google Assistant Overview
Google Assistant Overview  Google Assistant Overview
Google Assistant Overview AI.academy
 
Mobile html5 today
Mobile html5 todayMobile html5 today
Mobile html5 todayIdo Green
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Tomáš Kypta
 

Similar to Android accessibility 9th_april_droidcon (20)

Android Made Simple
Android Made SimpleAndroid Made Simple
Android Made Simple
 
Google I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and JetpackGoogle I/O 2019 - what's new in Android Q and Jetpack
Google I/O 2019 - what's new in Android Q and Jetpack
 
Mobile Web Rock
Mobile Web RockMobile Web Rock
Mobile Web Rock
 
GDCS - Introduction to Google Products and Technologies.pptx
GDCS - Introduction to Google Products and Technologies.pptxGDCS - Introduction to Google Products and Technologies.pptx
GDCS - Introduction to Google Products and Technologies.pptx
 
Introduction to Cloud Computing and Google Cloud Platform.
Introduction to Cloud Computing and Google Cloud Platform.Introduction to Cloud Computing and Google Cloud Platform.
Introduction to Cloud Computing and Google Cloud Platform.
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 
Getting started with cloud
Getting started with cloudGetting started with cloud
Getting started with cloud
 
A Kickstart to Google Cloud
A Kickstart to Google CloudA Kickstart to Google Cloud
A Kickstart to Google Cloud
 
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
Baparekraf Digital Talent Day: Monitoring dan Coaching Penerima Fasilitasi BD...
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform Update
 
Android
AndroidAndroid
Android
 
Trending Time on Google Glass - see what everyone's buzzing about
Trending Time on Google Glass - see what everyone's buzzing aboutTrending Time on Google Glass - see what everyone's buzzing about
Trending Time on Google Glass - see what everyone's buzzing about
 
Android App Development - 01 Introduction
Android App Development - 01 IntroductionAndroid App Development - 01 Introduction
Android App Development - 01 Introduction
 
Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"Milos Marinkovic "Modular Android UI"
Milos Marinkovic "Modular Android UI"
 
Delegating user tasks in applications
Delegating user tasks in applicationsDelegating user tasks in applications
Delegating user tasks in applications
 
How browser accessibility can enhance safe driving (AGL Summit Nov 2020)
How browser accessibility can enhance safe driving (AGL Summit Nov 2020)How browser accessibility can enhance safe driving (AGL Summit Nov 2020)
How browser accessibility can enhance safe driving (AGL Summit Nov 2020)
 
YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5
 
Google Assistant Overview
Google Assistant Overview  Google Assistant Overview
Google Assistant Overview
 
Mobile html5 today
Mobile html5 todayMobile html5 today
Mobile html5 today
 
Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012Android development - the basics, MFF UK, 2012
Android development - the basics, MFF UK, 2012
 

Android accessibility 9th_april_droidcon

  • 1. Google Confidential and Proprietary Designing Accessible Android Applications April 9, 2013
  • 2. Google Confidential and Proprietary Agenda ● What is accessibility? ● What features are available? ● How do you make your app accessible? ● Testing and Debugging
  • 4. Google Confidential and Proprietary What framework provides ● User interactions and system events generate AccessibilityEvents and send them to services ● AccessibilityServices like TalkBack respond to these events and provide feedback to the user
  • 5. Google Confidential and Proprietary What framework provides Donut (1.6) through Honeycomb (3.x) ● Spoken feedback through TextToSpeech APIs ● Modify your device's display and sound options ○ Large text ○ Change speed at which text is spoken ○ Disable screen rotation Ice Cream Sandwich (4.0) ● Touch exploration for devices without D-Pad ● Services can inspect view hierarchy
  • 6. Google Confidential and Proprietary What framework provides JellyBean (4.1) ● Supports Accessibility focus ○ Services can place this focus on any view ○ Indicated on-screen via yellow rectangle ● Supports Braille I/O devices via BrailleBack service
  • 7. Google Confidential and Proprietary What framework provides JellyBean (4.1) ● Many actions available ○ Move input focus ○ Click on views ○ Scroll within views ○ Navigate text by words, etc. ○ Perform global actions
  • 8. Google Confidential and Proprietary Features in Jelly Bean Gestures ● Services can respond to user- drawn gestures ○ Perform accessibility actions ○ Invoke global actions (Home, Back, etc.) ● Deterministic access to screen content
  • 9. Google Confidential and Proprietary Features in Jelly Bean Magnification ● Available in Android 4.2 ● Multiple zoom modes ○ Triple-tap to toggle ○ Triple-tap and hold for momentary zoom
  • 10. Google Confidential and Proprietary Features in Jelly Bean Gestures ● Quick shortcuts available in Global Context Menu ○ Pause feedback ○ Repeat/spell last utterance ○ TalkBack Settings
  • 11. Google Confidential and Proprietary (demo)
  • 12. Google Confidential and Proprietary What framework provides Android sensors ● SMS, Video chats, Videos with Captions ● Location aware, GPS, maps, places ● proximity ● eyes free - motion / accelerometer / velocity tracker / light sensor ● motion, environmental and position sensors Read the Android Developer Guide for Sensors
  • 13. Google Confidential and Proprietary What framework provides Google Play ● Paid apps in many Countries ● DCB Developer Console ● Countries and currencies ● Auto Translate feature ● Statistics Global accessibility ● i18n and l10n Read the Android Developer Guide for Localization
  • 14. Google Confidential and Proprietary What framework provides Design recommendations ● Navigation should be easy ● Use recommended touch target sizes ● Alternatives to time-out controls ● Label UI elements meaningfully ○ Minimize Chatter ○ Provide feedback Read the Android Design Guide for Accessibility
  • 15. Google Confidential and Proprietary (demo)
  • 16. Google Confidential and Proprietary Code changes for Accessibility Labeling content ● Controls without text need android:contentDescription ● Android Lint tool warns when images are missing descriptions ● Purely decorative Views should set android: contentDescription="@null" ● Use setContentDescription() to update a View's description ○ Don't override getContentDescription() ● EditTexts should use android:hint
  • 17. Google Confidential and Proprietary <ImageView android:id="@+id/rounded_corner" android:contentDescription="@null" ... /> <ImageView android:id="@+id/search_button" android:focusable=”true” android:contentDescription="@string/search" ... /> <EditText android:id="@+id/search_field" android:hint="@string/search_hint" ... />
  • 18. Google Confidential and Proprietary Code changes for Accessibility Supporting D-Pad navigation ● Prior to Android 4.0, app needs to be accessible via D-Pad ○ Includes arrow keys on USB and Bluetooth keyboards ○ This is easy to test in the emulator! ● May need to manually specify that clickable items (e.g. ImageViews) are focusable using android:focusable="true" ● Make important text focusable ● Control order using android:nextFocusDown
  • 19. Google Confidential and Proprietary <LinearLayout android:orientation="horizontal" ... > <EditText android:id="@+id/edit" android:focusable=”true” android:nextFocusDown=”@+id/text” ... /> <TextView android:id="@+id/text" android:focusable=”true” android:text="@string/terms_of_service" android:nextFocusUp=”@id/edit” ... /> </LinearLayout>
  • 20. Google Confidential and Proprietary Code changes for Accessibility Supporting scaled text ● Android supports large fonts for low-vision use ● Text sizes should be in sp "scaled pixels" instead of dips ● Always test your app for text cropping, wrapping, etc. ○ You should be doing this for i18n anyway! <TextView android:id="@+id/intro_text" android:textSize="14sp" .... />
  • 21. Google Confidential and Proprietary (demo)
  • 22. Google Confidential and Proprietary Logical grouping and ordering ● View hierarchy order and on-screen positioning determine grouping for accessibility focus and ordering of spoken feedback ● Group non-focusable items (e.g. TextViews) in a focusable container to have them read as a single item ● Set content description on a container to override automatic grouping and ordering of contained items
  • 23. Google Confidential and Proprietary Logical grouping and ordering
  • 24. Google Confidential and Proprietary FolderIcon android:id="@+id/folder" android:focusable="true" android:contentDescription="@string/folder_google" ...> <ImageView android:id="@+id/preview_background" android:contentDescription="@null" ... /> <BubbleTextView android:id="@+id/folder_icon_name" android:text="@string/google" ... /> </LinearLayout>
  • 25. Google Confidential and Proprietary Testing and Debugging for Accessibility For all Android apps ○ Create checklist ○ Check with real simulation ○ Test on all supported Platforms ○ Test on screens and densities Screens: small, normal, large, xlarge Densities: (low (ldpi), medium (mdpi), high (hdpi), extra high (xhdpi))
  • 26. Google Confidential and Proprietary Testing and Debugging for Accessibility For all Android apps ● Enable Accessibility features ○ Turn on TalkBack logging in Accessibility > TalkBack > Settings > Developer settings ● Android Lint tool
  • 27. Google Confidential and Proprietary Summary Must do: ● Use built-in Android components ○ Label controls ○ Make controls focusable ○ Ensure traversal order is correct ○ Specify text in sp ○ Logically group UI elements ● Fix custom components ○ Implement accessibility interfaces ○ Use Support library ○ TouchExplorationHelper is available on Google Code ● Test and Fix
  • 28. Google Confidential and Proprietary Summary Good to have: ● Augment audio-only prompts ○ Visual cues ○ Haptic feedback ● Evaluate sensors ● Add captions to videos ● Follow UI guidelines ● Reach globally Read the Android Developer Guide for Accessibility
  • 29. Google Confidential and Proprietary Thanks and Questions? Send feedback to: soniash@google.com