Language: EN

ARIA buttons or links without a name

Message shown by axe and Lighthouse: ARIA commands must have an accessible name · aria-command-name · WCAG 4.1.2

What it means and why it matters

Custom controls (role="button", role="link", role="menuitem") need an accessible name, otherwise their purpose is unknown (WCAG 4.1.2).

How to fix it

Add text content or aria-label to the element.

Code example

Before

<div role="button" tabindex="0" class="icon-heart"></div>

After

<div role="button" tabindex="0" class="icon-heart" aria-label="Add to wish list"></div>

Find this error on your website

Run a free check of any page — results in seconds, with fix instructions.

Check a page for free

All accessibility errors

Order a paid plan

Leave your email and we'll contact you as soon as the plan can be ordered.