Touch Target Size

Link to Touch Target Size copied to clipboard

WCAG 2.1 - 2.5.5 AAA Impact - Moderate

Views that can be interacted with must have a touch target size of at least 44 x 44 DP.

Supported within:
XML Layouts

Impact

On a touch device, small controls are a usability issue for everyone. Additionally, people experiencing motor limitations have increased difficulty interacting with small targets.

Confirmation

  1. Identify the pixel density of your Android device.
  2. Utilize the view hierarchy inspector to confirm how big the control is in pixels.
  3. One of the following will happen:
    • Accessible: Ensure the control is the correct number of density-independent-pixels (dip).
    • Inaccessible: The control is not either 44 dip wide or 44 dip high.

How to Fix

Button button = findViewById(R.id.an_accessible_button_yay)
button.setMinimumHeight(44);
button.setMinimumWidth(44);
<Button
     android:id="@+id/an_accessible_button_yay"
     android:minimumHeight="44dp"
     android:minimumWidth="44dp"
     android:text="@string/batman_likes_accessible_buttons" />