Building Accessible Android Apps: A Practical Guide

Accessibility is often treated as an afterthought, but it is both a legal requirement in many markets and a quality signal that correlates strongly with overall app polish. Apps built accessibly tend to be better structured, easier to test, and more pleasant to use for everyone — not just users with disabilities.

Who Benefits from Accessible Design

An estimated 15% of the world's population lives with some form of disability. Beyond permanent disabilities, situational impairments matter too: a user with one hand occupied, bright sunlight making the screen hard to see, or a user who prefers keyboard navigation. Accessible design serves all of these cases.

TalkBack: The Most Important Test

TalkBack is Android's screen reader. If your app works well with TalkBack, it is accessible. To test:

  • Enable TalkBack in Settings → Accessibility.
  • Navigate your app using only swipes and taps — no visual cues.
  • Every interactive element must have a meaningful description that is announced aloud.

Content Descriptions

Every non-text interactive element needs a content description. Be specific — describe the action, not just the icon.

// XML
<ImageButton
    android:contentDescription="@string/cd_add_to_favorites" />

// Compose
Icon(
    imageVector = Icons.Default.Favorite,
    contentDescription = "Add to favorites"
)

For decorative images that carry no information, set contentDescription="" (XML) or contentDescription = null (Compose) so TalkBack skips them.

Touch Targets

The minimum recommended touch target is 48dp × 48dp. Small icons and close-together buttons are a common source of frustration and failure.

// Ensure minimum touch target in Compose
IconButton(
    modifier = Modifier.minimumInteractiveComponentSize(), // 48dp enforced
    onClick = { ... }
) { Icon(...) }

Color and Contrast

  • Normal text needs at least 4.5:1 contrast ratio against its background (WCAG AA).
  • Large text (18sp+ or 14sp+ bold) needs at least 3:1.
  • Never rely on color alone to convey information — add an icon, label, or pattern.
  • Test with the Accessibility Scanner app (Google) which flags contrast violations automatically.

Focus Order and Navigation

  • Focus order should match the visual reading order (top-left to bottom-right for LTR layouts).
  • In Compose, use Modifier.semantics { traversalIndex = N } to control focus order.
  • Modal dialogs must trap focus — users should not be able to focus outside the dialog while it is open.

Semantics in Compose

// Group elements into a single semantic node
Row(
    modifier = Modifier.semantics(mergeDescendants = true) {}
) {
    Icon(Icons.Default.Star, contentDescription = null)
    Text("4.8 stars")
}
// TalkBack announces: "4.8 stars" (not "Star" then "4.8 stars")

Quick Win Checklist

  • Add content descriptions to all icon-only buttons.
  • Increase minimum touch targets to 48dp.
  • Run the Accessibility Scanner on your most-used screens.
  • Test the critical flow with TalkBack enabled.
  • Check contrast ratios with Colour Contrast Analyser or Material Theme Builder.