Start scanning free

( Robust / WCAG 4.1.2 )

ARIA toggle field has no accessible name

This check maps to Name, Role, Value. Use the guidance below to confirm the issue, understand who it affects and ship a fix.

Serious Level A WCAG 4.1.2 — Name, Role, Value

What’s wrong

An element with role checkbox, radio, or switch has no accessible name, so its on/off state is announced without saying what it toggles.

Why it matters

Hearing “checked” or “not checked” with nothing else means the user has to guess what setting they’re changing.

How to fix it

Label the toggle with visible text or aria-label.

Before
<div role="switch" aria-checked="true"></div>
After
<div role="switch" aria-checked="true" aria-label="Dark mode"></div>

Learn more