Skip to content

Latest commit

 

History

History
34 lines (18 loc) · 2.44 KB

accessibility-guidelines.md

File metadata and controls

34 lines (18 loc) · 2.44 KB

Activity Titles

When an Activity comes to the foreground, TalkBack announces it’s title. When the activity has no title, TalkBack announces the name of the application which might confuse the user -> set a title to all visible activities, either in AndroidManifest or using Activity.setTitle() method.

Images

  • Illustrative images such as ImageView's should have importantForAccessibility set to “no” -> android:importantForAccessibility="no".

  • Buttons such as ImageButton's with labels should have contentDescription set to null. Setting importanceForAccessibility to “no” makes them unfocusable in the accessibility mode.

  • ImageButtons without text labels must set a valid contentDescription. Exclude the element type from the contentDescription.

    • Most accessibility services, such as TalkBack and BrailleBack, automatically announce an elements type after announcing its label.

Example: The background image on the login prologue screen (below) does not require additional context because the text announces the intent of the view. The same is true of the JetPack login button.

Labels & Hints

  • When a UI element is just a label for another element, set the labelFor attribute.

  • When labeling editable elements, such as EditText objects, use the android:hint XML attribute for static elements and setHint() for dynamic elements.

Grouping Content

  • If users should treat a set of elements as a single unit of information, you can group these elements in a focusable container (use android:focusable=”true”).

Example: The email note to customer component was specifically built to better communicate the purpose of this settings by using a focusable container

Custom Views