Accy

Element with an interactive role but no name

WCAG 4.1.2 (A) · EN 301 549 9.4.1.2

An element has role="{role}" and no accessible name.

Why it matters

If you give a <div> the button role, you take on responsibility for everything a button provides by default, starting with its name. Without one, the screen reader announces the role and no content.

How to fix it

Add an aria-label, or better: replace the <div> with the native element, which solves name, focus and keyboard at once.

Related

Does your shop have this failure?

Check for free, along with the other 54 rules. No sign-up.

No sign-up. We scan one public page and store nothing about you.