Accessibility guides

Shopify theme accessibility: the fixes that belong in your theme code

Most accessibility failures on a Shopify store come from a handful of places in the theme. Fixing them in the theme code, instead of with a script that patches the page afterwards, means the fix is really in the HTML your customers receive. Duplicate your theme and work on the copy.

Product and collection images

Use the alt text stored on the image, and fall back to the product title:

{%- assign image_alt = image.alt | default: product.title -%}
{{ image | image_url: width: 800 | image_tag: alt: image_alt }}

Then fill in real alt text for your main product images in the admin; the fallback only prevents the worst case.

Icon links and buttons in the header

<a href="{{ routes.cart_url }}" aria-label="{{ 'general.cart.title' | t }}">
  {{- 'icon-cart.svg' | inline_asset_content -}}
</a>

Check cart, search, account, menu and every social icon in the footer.

Form labels

Every label for must match its field's id. Search the theme for for="{{; a label pointing at translated text instead of an id is a mistake we have found in a widely used theme.

Page language and zoom

<html lang="{{ request.locale.iso_code }}">
<meta name="viewport" content="width=device-width, initial-scale=1">

What the theme cannot fix

Check your own site

Our free scanner loads your pages in a real browser and lists every failure like this one that automated testing can detect. Scan a site.