2. Agenda
● What is accessibility?
● What features are available?
● How do you make your app accessible?
● Testing and Debugging
Google Confidential and Proprietary
4. 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
5. 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
6. 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
7. 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
8. 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
9. 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
10. Features in Jelly Bean
Gestures
● Quick shortcuts available in
Global Context Menu
○ Pause feedback
○ Repeat/spell last utterance
○ TalkBack Settings
Google Confidential and Proprietary
12. 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
13. 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
14. 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
16. 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
18. 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
20. 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
22. 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
25. 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
26. 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
27. 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
28. 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
29. Thanks and Questions?
Send feedback to:
soniash@google.com
Google Confidential and Proprietary