New York Accessibility Hackathon - Accessibility on Android

New York Accessibility Hackathon - Accessibility on Android

4d2070e800356da57315d427aa2343f4?s=128

François Blavoet

June 03, 2017
Tweet

Transcript

  1. @francoisblavoet Accessibility On Android

  2. @francoisblavoet

  3. WHAT IS ACCESSIBILITY ? ▸ Accessibility : making sure that

    anyone can use your application ▸ Who is targeted ?
 Blind
 Any kind of visual, auditory and motor disabilities
 Color blindness
 …

  4. WHO ▸ United States, 23.7 million adults report difficulty seeing

    ▸ EU : 75 million have some disability
 30 million have partial sight
 
 By 2025, 20% of the European population will be over 65
  5. WHO

  6. TEXT

  7. First tool : Color and Contrast

  8. ▸ follow the material spec ▸ try to get close

    to a 5:1 contrast ratio TEXT AND IMAGES
  9. COLORS

  10. COLORS

  11. TEXT SIZES

  12. TEXT SIZES

  13. ▸ New with Nougat : change the display size !

    ALSO : DISPLAY SIZE
  14. MAKE YOUR TOUCH TARGETS BIG ENOUGH ▸ 48dp * 48

    dp should be your smallest target
  15. MAKE YOUR TOUCH TARGETS BIG ENOUGH ▸ Sometimes, your view

    hierarchy makes this hard : use a touch delegate val rect = Rect() view.getHitRect(rect) rect.right += 24.pxToDp(context) rect.bottom += 16.pxToDp(context) (view.parent as View).touchDelegate = TouchDelegate(rect, view)
  16. CONTENT DESCRIPTION

  17. CONTENT DESCRIPTION <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="@{() -> presenter.onFabClick()}" android:src=“@drawable/ic_add_24"

    android:contentDescription="@string/create_new_item" />
  18. FOCUS <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="@{() -> presenter.onFabClick()}" android:src=“@drawable/ic_add_24" android:contentDescription=“@string/create_new_item"

    android:focusable="true" android:nextFocusDown=”@+id/recyclerView” />
  19. ▸ Eyes free keyboard :

  20. ACCESSIBILITY CHECKLIST ▸ make sure to have enough contrast ▸

    don’t rely only on color to signal error / success ▸ support sp fonts without breaking your layouts ▸ support display size changes ▸ make sure your touch targets are at least 48dp x 48dp ▸ provide content description ▸ make sure that the focus handling is correct