Accessibility guide
Fix color contrast in your Shopify theme
What you’ll need
Your theme file (ZIP) (optional, for colours, zoom, focus, labels and video)
How to get this: Your theme file (ZIP)
- Online Store › Themes › … on your theme › Download theme file.
- Shopify emails you a link; download the ZIP from the email.
Your products export CSV (optional, for image alt text)
How to get this: Your products export CSV
- Products › Export › All products › Export products.
- Small exports download; big ones arrive by email.
Where Shopify themes keep their colors
Online Store 2.0 themes such as Dawn and Horizon define color schemes (scheme-1, scheme-2 and so on) in Theme settings › Colors. Each scheme has a background, a text (foreground) color and button colors, and each section picks a scheme. The theme file you download keeps them in config/settings_data.json.
The numbers to hit
- Normal text, prices, links and button labels: 4.5:1 or more (WCAG 1.4.3, level AA).
- Large text (24 px and up, or 18.66 px bold and up): 3:1 or more.
- Icons, input borders and focus outlines: 3:1 against what’s next to them (WCAG 1.4.11).
- Grey #767676 on white is 4.54:1, about the lightest grey that passes on white. Brand colors such as a light gold or pastel on white usually fail.
Fix a failing scheme
- Online Store › Themes › Customize › Theme settings › Colors, and open the scheme the checker flagged.
- Change the text color (or the background) and re-check the ratio: darker text on light backgrounds, lighter text on dark ones.
- For a button, change either the button color or the button label color.
- Keep a brand color that fails as a background for large headings or as an accent, and use a darker shade for body text and buttons.
- Save, download the theme file again and re-run the check.
What the check can’t see
Text placed on an image or a video (image banners, slideshows) depends on the photo, so the ratio can’t be read from settings. Check those on the live page, or add an overlay in the section’s settings to darken the image behind the text.