Skip to main content

Shopify Liquid guide

How to fix top WCAG 2.2 AA issues in Shopify themes

Practical Liquid and CSS patches for the most common ADA Title III and EAA failures on Shopify storefronts.

3 fixes · Written for Shopify Liquid

  1. 1

    image-alt

    WCAG 1.1.1 Non-text Content

    Product gallery and promotional banner images render without alt attributes in Liquid snippets.

    The fix

    <!-- Before -->
    <img src="{{ product.featured_image | image_url: width: 800 }}">
    
    <!-- After -->
    <img src="{{ product.featured_image | image_url: width: 800 }}" alt="{{ product.featured_image.alt | default: product.title | escape }}">
  2. 2

    button-name

    WCAG 4.1.2 Name, Role, Value

    Cart drawer close icons and quantity +/- buttons use SVG icons with no accessible label.

    The fix

    <!-- Before -->
    <button class="cart-close">{% render 'icon-close' %}</button>
    
    <!-- After -->
    <button type="button" class="cart-close" aria-label="Close shopping cart">{% render 'icon-close' %}</button>
  3. 3

    color-contrast

    WCAG 1.4.3 Contrast (Minimum)

    Light gray sale badges and placeholder prices fall below the 4.5:1 contrast ratio.

    The fix

    /* Before: #9ca3af on #ffffff (2.54:1 FAIL) */
    .price-compare { color: #9ca3af; }
    
    /* After: #525866 on #ffffff (7.12:1 PASS) */
    .price-compare { color: #525866; }

Free scan, free account

Scan your Shopify Liquid site automatically.

Scan free, then sign in with a free account to get every failing selector plus an agent-ready export with fix guidance.

Run a free scan
How to fix top WCAG 2.2 AA issues in Shopify themes | WCAGBench