Accy

Clickable element unreachable by keyboard

WCAG 2.1.1, 4.1.2 (A) · EN 301 549 9.2.1.1

There is a <{tag}> with a click handler but no role and no place in the tab order.

Why it matters

A mouse can click anything; a keyboard cannot. A <div> with onclick is invisible to anyone navigating with Tab, with a switch, or by voice control. If that div is "Add to basket", the shop is unusable.

This is the failure that most often leaves a checkout completely blocked.

How to fix it

Use <button>. It handles focus, activation with Enter and Space, and role announcement, all at once and with no extra JavaScript.

As it is
<div onclick="addToCart()">Add to basket</div>
As it should be
<button type="button" onclick="addToCart()">Add to basket</button>

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.