2. Universal design
Talkback, Explore By Touch, Accessibility Settings
Use recommended touch target sizes: 48 dp; more for kids
Label visual UI elements meaningfully
Provide alternatives to affordances that time out
Use standard framework controls or enable TalkBack for
custom controls
Try it out yourself
ACCESSIBILITY DESIGN
3. For visually and hearing impaired
Talkback and Explore by Touch
For UI controls: android:contentDescription
For custom controls extending View: Use APIs
EditText Use android:hint
Focus navigation android:focusable; Controlling focus order
Custom Views: handle KEYCODE_DPAD_CENTER; populate
Accessibility events(dispatchPopulateAccessibilityEvent(),
onPopulateAccessibilityEvent(),
onInitializeAccessibilityEvent()); sendAccessibilityEvent(Acces
sibilityEvent.TYPE_VIEW_TEXT_CHANGED); Provide customized
accessibility context (the getAccessibilityNodeProvider(),
AccessibilityNodeProvider); Handling custom touch
events(onTouchEvent(MotionEvent))
UI ACCESSIBILITY
4. android:contentDescription,setContentDescription(CharSeque
nce), android:focusable, focusorder, Custom view controls, No
audio-only feedback(a notification or haptic feedback), test
directional controls, test eyes free
Avoid having user interface controls that fade out or
disappear after a certain amount of time.
android:hint, virtual view hierarchy, Custom controls, Prompts
for related controls, video captioning and subtitles,
announceForAccessibility(CharSequence), Sets of small
controls with one contentDescription, no accessibility for
decorative images
ACCESSIBILITY DEVELOPER CHECKLIST
5. uses-permission BIND_ACCESSIBILITY_SERVICE
accessibility_service_config.xml accessibility options for
service
android:packageNames service will handle events for classes
in this folder
android:accessibilityEventTypes events handled
Extend AccessibilityService class
Event details: AccessibilityEvent.getRecordCount(),
AccessibilityEvent.getSource()
Accessibility Focus
ACCESSIBILITY SERVICE
6. Directional Controls
TalkBack audio prompts
Enable Explore by Touch
All actionable controls should be min 48dp
Enable talkback, verify gestures work
Audio feedback must have alternate feedback(notification,
haptic)
TESTING