Accessibility of the android application
the four step of accessibility
- Add descriptive text to user interface controls in your application using the android:contentDescription attribute. Pay particular attention to ImageButton, ImageView and CheckBox.
- Make sure that all user interface elements that can accept input (touches or typing) can be reached with a directional controller, such as a trackball, D-pad (physical or virtual) or navigationgestures .
- Make sure that audio prompts are always accompanied by another visual prompt or notification, to assist users who are deaf or hard of hearing.
- Test your application using only accessibility navigation services and features. Turn on TalkBack and Explore by Touch, and then try using your application using only directional controls. For more information on testing for accessibility, see the Accessibility Testing Checklist.
Content Describtion
important for:
check box
Image button
image view
decorative graphic ‘s contentDescription set to null
Text field hints: For EditText fields, provide an android:hint attribute instead of a content description, to help users understand what content is expected when the text field is empty and allow the contents of the field to be spoken when it is filled.
in XML:
<ImageButton
android:id=”@+id/add_note_button”
android:src=”@drawable/add_note”
android:contentDescription=”@string/add_note”/>
in java code:
setContentDescription(CharSequence)