Shopify accessibility and the European Accessibility Act: what to fix in your theme
Last updated:
Shopify gives you a solid base, but a Shopify store is not accessible just because it runs on Shopify. Most problems come from the theme, installed apps and the content you add. This guide shows where they usually are and how to fix them, with Liquid examples you can hand to your developer.
What Shopify handles, and what it doesn't
Shopify runs the platform and hosts the checkout. You can't change the checkout's code on most plans, but the colours and fonts you choose in the checkout editor still affect contrast, and checkout apps add their own content. Everything before the checkout is your responsibility: the theme, apps that inject widgets (reviews, pop-ups, chat, cookie banners), and your content (product images, descriptions, videos).
Themes in the Shopify Theme Store must meet accessibility requirements, including an average Lighthouse accessibility score of at least 90 and keyboard access from the home page to checkout. That is a good starting point, not proof: Lighthouse runs automated checks only, and your customisations and apps aren't part of the review.
1. Product images without alt text
The most common problem in shops. Add alt text to each product image in the admin: open the product, click the image and choose Add alt text. For images placed through the theme editor, set it under Content › Files. Describe what a customer needs to know ("Navy linen shirt, front view"), not the file name.
If your theme ignores the alt text, fix the template so it passes it on, with a sensible fallback:
Before
{{ product.featured_image | image_url: width: 600 | image_tag }}After
{%- liquid
assign alt = product.featured_image.alt | default: product.title
-%}
{{ product.featured_image | image_url: width: 600 | image_tag: alt: alt }}Purely decorative images should have an empty alt="" so screen readers skip them.
2. Icon buttons without a name
Cart, search, account, menu and close buttons are often just an icon. A screen reader then announces "button" with no idea what it does. Give each one a name, and say whether the drawer it opens is open:
Before
<button class="header__icon" onclick="openCart()">
{% render 'icon-cart' %}
</button>After
<button type="button" class="header__icon" aria-label="{{ 'templates.cart.cart' | t }}"
aria-expanded="false" aria-controls="CartDrawer">
{% render 'icon-cart' %}
</button>Use your theme's translation keys (or plain text) so the name is in your customer's language.
3. Variant pickers and colour swatches
Custom swatches built from divs can't be reached with a keyboard and don't say which colour is selected. Build them as real radio buttons with a visible or hidden text label:
Before
<div class="swatch" style="background:#1d3557" onclick="pick('Navy')"></div>After
<fieldset>
<legend>Colour</legend>
<input type="radio" id="c-navy" name="Colour" value="Navy">
<label for="c-navy"><span class="swatch" style="background:#1d3557"></span>Navy</label>
</fieldset>Also check that sold-out variants are announced in text, not only greyed out.
4. Cart drawers, pop-ups and menus
When a cart drawer, newsletter pop-up or mobile menu opens, keyboard focus must move into it, stay there while it's open, and return to the button that opened it when it closes. Escape should close it. Newsletter and discount pop-ups from apps are frequent offenders: test them with only the keyboard, and turn off any that trap you.
5. Contrast in prices, badges and buttons
Sale prices in light red, grey "compare at" prices and white text on pastel buttons often fall below the 4.5:1 contrast ratio for normal text. Change the colour scheme in Theme settings › Colors rather than in single sections, so the fix applies everywhere.
6. Sticky headers and focus
WCAG 2.2 adds a rule that the element with keyboard focus must not be completely hidden by sticky headers, cookie banners or chat bubbles. A small CSS change usually fixes the header:
html { scroll-padding-top: var(--header-height, 80px); }Keep the visible focus outline. Removing it with outline: none makes the shop unusable by keyboard.
7. Slideshows and videos
Hero slideshows that move on their own need a visible pause button. Product videos need captions; Shopify lets you upload them for videos you host, and YouTube or Vimeo embeds have their own caption tools.
Test it yourself in 10 minutes
- Put the mouse away. Use Tab, Shift+Tab, Enter and Space to find a product, pick a variant, add it to the cart and reach the checkout.
- Can you always see where the focus is? Does every pop-up close with Escape?
- Zoom the browser to 200%. Is everything still readable and usable?
- Run an automated scan of your home, collection, product and cart pages for the rest.
Find these problems in your own Shopify store, with fixes for your theme.
Sources
- Shopify: Theme Store accessibility requirements
- Shopify: accessibility best practices for themes
- W3C: Web Content Accessibility Guidelines (WCAG) 2.2
- W3C: Understanding 2.4.11 Focus Not Obscured (Minimum)
This guide is general information, not legal advice. An automated scan finds many problems but not all of them, so it can't on its own show that a shop meets the law.