If you are an Android developer or would like to work in this field, we are glad that you have stopped by. On this page, we will explain how you can make your existing application accessible for the blind and visually impaired to use it efficiently, and how you can make the necessary adjustments by using the guides on the Google Android developers page.
TalkBack, a screen reader in the Android accessibility Suite, which works on Android devices and is being developed by Google, provides audible feedback for the blind and visually impaired with the help of the TTS applications such as Google Speech services, also developed by Google. You can find and enable TalkBack under Settings>accessibility on your device.
When TalkBack is on, one more finger is added to finger gestures. For example, if you swipe up / down on the screen with your finger, you can do the same with two fingers when TalkBack is on. To click a button or control, you can quickly double-tap it. When you enable TalkBack, a tutorial will also is displayed to guide you to learn gestures. You can press and hold the volume up and down buttons simultaneously for a few seconds to disable TalkBack at any time. The TalkBack watermark also displays this prompt as long as TalkBack is turned on.
Accessibility Scanner is an Android application specially made for developers by Google. After installing this app you will find guides where you can fix basic accessibility issues in your app.
From the Google accessibility guide: button labeling and defining the roles of elements
Users of accessibility services, such as screen readers, rely on text labels to interact with their user interface. One of the biggest problems faced by the visually impaired in Android applications is that text labels and Content descriptions mentioned below are not included.
Screen readers announce the text label with information about the type or status of the items. As a result, app developers are not required to add type or state information when adding labels. For example:
- When TalkBack announces a clickable Button, it adds the word “button” to the text label provided by the developer. If the developer adds a “button” to the text tag (like “Save button”), TalkBack can say the word “button” twice (“Save button button”). If an interface has a CheckBox element, the screen reader determines whether the element is checked and announces “checked” or “unchecked” along with a developer-supplied text label. If the developer includes “checked” or “unchecked” in the text label, the user may hear this information twice. Assistive technologies often describe their own gestures or interaction behaviors tailored to the needs of their users. Accessibility labels provided by the application depend on the assistive technology used and should not provide specific interaction instructions that could be incorrect. For example:
- TalkBack includes its own interaction instructions, “Double tap to select” to explain the clickable UI elements. If these instructions are included in the accessibility labels provided by the application, TalkBack may say these interaction instructions twice. If provided by the app, the same instructions would not be available for the Switch Access users.
App standard elements
When providing text labels for standard UI elements provided by the Android SDK, Android Support Library, or Android Design Support Library, use a short localized string describing what the element does or represents. A well-implemented UI does not add item type or state descriptions to the values of the android:contentDescription, android:text, or android:hint attributes.
When creating UI elements with custom views, extend the View subclass that is most relevant to your use case. This allows the application of a custom view to inherit as much platform standard accessibility interaction behavior as possible, and in most cases the correct representation of the view’s type and state is managed on behalf of your application.
Text descriptions (Content description)
When using an ImageView, ImageButton, CheckBox, or other View that communicates information graphically, use an android:contentDescription attribute to provide a content label for that View. A content label sometimes depends on information available only at runtime, or the meaning of a View can change over time. For example, a Play button can turn into a Pause button during music playback. In these cases, Use View#setContentDescription(CharSequence contentDescription) to update the content label at the appropriate time.
For EditTexts or editable TextViews, use an android:hint attribute to specify the purpose of the text field. An android:contentDescription should not be used as a content label for editable Views. Use an android:labelFor attribute to specify that a View should act as a content label for another View.
Testing your app for accessibility
With the help of Accessibility Scanner and TalkBack, you can perform all the tests. However, testing your app by a real user will make your job easier in the long run. For this purpose, you can reach us from our contact page or Telegram group, and you can pave the way for your application to be tested by our administrators and blind and visually impaired followers of our Accessible Android community.