Android design - Keyboard navigation & Switch Access

Access to interactive elements #

Target : everyone and especially people with motor disabilities who use a keyboard to navigate.
When : during design and development.

Navigation using Switch Access or keyboard is very useful for people with motor or cognitive difficulties. This navigation makes it possible to move from one interactive element to another (element on which an action can be performed).

To manage keyboard and Switch Access navigation, there are 2 things to check:

  • Allow focus on interactive elements (focus navigation only concerns interactive elements). If, for example, your application has custom views that can be clicked on, you must make sure that these views are focusable by setting the focusable attribute to true.
  • Manage the focus display: any interactive element can receive the focus, so the state_focused must be defined and allow to easily distinguish which element has the focus.

To be verified :

  • With the keyboard (and Switch Access) navigation, it is possible to visually determine which element has the focus.
  • All the features are accessible with the keyboard (and Switch Access) navigation.
  • All interactive elements are highlighted with the keyboard (and Switch Access) navigation.
  • Only the interactive elements are highlighted with the keyboard (and Switch Access) navigation.

Reference WCAG :

Order keyboard navigation #

Target : everyone and especially people with motor disabilities who use a keyboard to navigate.
When : during design and development.

Description :

Keyboard (and Switch Access) navigation, to be understandable and easy to use, must provide a coherent and comprehensible order of navigation. It is important to manage the focus order : through the options nextFocusDown, nextFocusUp, nextFocusRight and nextFocusLeft, you can specify which view should take the focus according to the use of the tab, down, up, right and left arrows.

Note: nextFocusDown, nextFocusUp, nextFocusRight, nextFocusLeft, focusable and other focus management options are available directly in the XML or in the code through the corresponding methods.

For more information on focus management on Android.

To be verified :

  • The keyboard navigation order is logical and consistent.
  • Items are grouped together when they are linked (example: content within a clickable item in a list).
  • It is possible to scroll in a drop-down list to access all the content
  • You are never trapped in a part of the screen (what we call a keyboard trap)

Reference WCAG :