Skip to content

Can’t reach or leave parts of the page with the keyboard

Many people move through a page with Tab and Enter instead of a mouse. On this page, something people need to click can’t be reached that way, or Tab gets stuck going round one part of the page, like a cookie banner.

Why it matters

People with motor disabilities and many screen reader users don’t use a mouse. If the menu or add to cart button can’t be reached with Tab, the shop doesn’t work for them.

A focus trap is worse: the keyboard user can’t get past it to anything else on the page.

How to fix it

  1. Try it: press Tab from the top of the page and check you can reach and use everything (menu, search, cart, forms, pop-ups) and get back out.
  2. Use real buttons and links for anything people click. A clickable div or span needs tabindex="0", a role and keyboard handling; a real button is simpler:
    <button type="button" class="cart">Cart</button>
  3. Banners shouldn’t trap Tab. Pop-ups that cover the page can keep Tab inside while open, but Escape and a visible close button must close them and return focus to where it was.
On Shopify
  1. If the menu or cart button is a theme or app element, ask the theme developer for a keyboard-accessible version; most current Shopify themes have one.

Common mistakes

  • Menus that only open on mouse hover.
  • A cookie banner or pop-up that grabs focus and won’t let it go.
  • tabindex values above 0, which scramble the order Tab follows.

Check your fix

Once the change is live, check the page again.