Skip to main content

Unlabeled Toggle Control

Android toggle controls (switches, toggle buttons) must have labels that describe what setting they control.

WCAG Reference

Maps to: WCAG 4.1.2 Name, Role, Value | Applies to: WCAG 2.0, WCAG 2.1, WCAG 2.2 Introduced in: WCAG 2.0 | Level: A | Read the official specification →

What this rule checks

The scanner flags Switch, ToggleButton, and SwitchCompat elements that have no accessible label, leaving TalkBack to announce only the state ("On" / "Off") without context.

Why it matters

Hearing "Switch, off" without knowing what the switch controls is useless. TalkBack users need both the label and the state to understand the setting and decide whether to change it.

Common failure patterns

  • Switch elements with no android:text and no contentDescription
  • toggle controls where the label is a separate TextView not programmatically linked
  • custom toggle implementations that do not expose accessibility text

Remediation guidance

  • set android:text on the toggle control to describe the setting
  • if the label is a separate view, use android:labelFor on the label pointing to the toggle
  • for Jetpack Compose, set a description in Modifier.semantics { contentDescription = "..." }
  • test with TalkBack to confirm the full announcement includes both the label and the state

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles