WooCommerce accessibility and the European Accessibility Act: themes, plugins and checkout

Last updated:

WooCommerce runs on WordPress, so your shop's accessibility depends on three layers: WordPress and WooCommerce themselves, your theme, and every plugin you add. The core is in reasonable shape; most problems come from themes, page builders and plugins. Here is where to look and what to change.

First, find out which checkout you have

Since WooCommerce 8.3 (November 2023), new shops get the Cart and Checkout blocks by default. Older shops usually still use the classic checkout, built from the [woocommerce_checkout] shortcode and PHP templates. Open your Checkout page in the editor: if you see a Checkout block, you're on blocks. The fixes differ: blocks are maintained by WooCommerce and changed through settings and extensions, the classic checkout through templates and filters.

1. Choose and check your theme

WordPress.org themes tagged accessibility-ready have passed a review against WordPress's accessibility rules: skip links, visible focus, keyboard menus, contrast. That review doesn't cover WooCommerce pages, so still test your product, cart and checkout pages. If your shop is built with a page builder, check its output too: builders often produce headings in the wrong order and buttons that are really divs.

2. Product images and the Media Library

Set alt text in Media › Library (the Alternative Text field) or when you upload a product image. Describe the product, not the file. WooCommerce outputs this text in product galleries and lists, so one fix works everywhere the image appears.

3. Duplicate links in product lists

Many themes link the image and the title separately to the same product. Keyboard users then tab twice per product, and the image link often has no text. Combine them into one link:

Before

<a href="<?php the_permalink(); ?>"><?php echo $product->get_image(); ?></a>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

After

<a href="<?php the_permalink(); ?>">
  <?php echo $product->get_image(); ?>
  <?php the_title(); ?>
</a>

Override WooCommerce templates in a child theme (copy from woocommerce/templates/ to your-theme/woocommerce/) so updates don't overwrite your fix.

4. Classic checkout fields

Every field needs a visible label and the right autocomplete value so browsers can fill it in and people with memory or motor impairments don't have to type everything. With the classic checkout, use the woocommerce_checkout_fields filter:

add_filter( 'woocommerce_checkout_fields', function ( $fields ) {
    // Visible labels, never placeholder-only fields.
    $fields['billing']['billing_phone']['label']        = __( 'Phone', 'your-theme' );
    $fields['billing']['billing_phone']['autocomplete'] = 'tel';
    $fields['billing']['billing_email']['autocomplete'] = 'email';
    return $fields;
} );

Don't hide labels and rely on placeholders: the placeholder disappears as soon as someone types. See our accessible checkout guide for error messages, shipping options and more.

5. AJAX filters, mini-carts and notices

Product filters, "add to cart" buttons and mini-carts often update the page without telling screen reader users anything happened. Announce changes in a polite live region:

<p class="screen-reader-text" role="status" aria-live="polite" id="filter-status"></p>
<script>
  // After the product list is updated by AJAX:
  document.getElementById('filter-status').textContent = count + ' products found';
</script>

WooCommerce's own notices ("added to your cart") should be kept visible long enough to read and not removed after a few seconds.

6. Plugins: test each one

Cookie banners, reviews, wishlists, chat, sliders and pop-up plugins bring their own markup. Before you install one, tab through its demo with the keyboard. After installing, re-scan the pages it appears on. If a plugin can't be fixed, look for an alternative; it's your shop that has to meet the requirements, not the plugin's author.

7. Contrast and focus

Check sale badges, star ratings, "out of stock" labels and buttons for 4.5:1 contrast, and make sure every link and button shows a visible focus outline. WCAG 2.2 also asks that sticky headers don't completely hide the focused element and that click targets are at least 24 by 24 pixels, or spaced so they don't overlap.

Scan your WooCommerce shop and get fixes for your theme and plugins.

Check my shop free

Sources

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.

More guides