Start scanning free

( Robust / WCAG 4.1.2 )

ARIA command 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 button, link, or menuitem has no text content, aria-label, or aria-labelledby, so assistive tech can’t announce what it does.

Why it matters

A screen reader user tabbing to the control hears only “button” or “link” with nothing else, no idea what pressing it will do.

How to fix it

Give the command an accessible name, either visible text or an aria-label if the visual design relies on an icon alone.

Before
<div role="button" onclick="closeDialog()"><svg>...</svg></div>
After
<div role="button" aria-label="Close dialog" onclick="closeDialog()"><svg>...</svg></div>

Where possible, use a native <button> instead of role="button", it gets keyboard support for free.

Learn more