android accessibility

7
ANDROID ACCESSIBILITY

Upload: puneet-kumar

Post on 13-Jul-2015

127 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Android accessibility

ANDROID ACCESSIBILITY

Page 2: Android accessibility

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 af fordances that time out

Use standard framework controls or enable TalkBack for

custom controls

Try it out yourself

ACCESSIBILITY DESIGN

Page 3: Android accessibility

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(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED); Provide customized accessibility context (the getAccessibilityNodeProvider(), AccessibilityNodeProvider); Handling custom touch events(onTouchEvent(MotionEvent))

UI ACCESSIBILITY

Page 4: Android accessibility

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

Page 5: Android accessibility

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

Page 6: Android accessibility

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

Page 7: Android accessibility

android:focusable="false”

android:focusableInTouchMode="false”

android:hapticFeedbackEnabled="false”

android:contentDescription="@null”

setContentDescription("\u00A0");

ETC