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