ARIA commands must have an accessible name

How to fix the aria-command-name accessibility rule. ARIA.

What this rule checks

Ensure every ARIA button, link and menuitem has an accessible name

Who is affected

A custom button/link/menu item (built with ARIA roles) has no name, so it is announced as just its role.

How to fix it

Add visible text inside it, or an aria-label.

WCAG success criteria

When this rule fails, the page fails:

Find it on your own page

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.

More detail