OnlineNexusAccess accessibility home Free scan

How to fix headings that skip levels in Shopify and WooCommerce themes

When we scanned 10 small online stores (8 on Shopify, 2 on WooCommerce), every one had headings that skip levels, such as a page that jumps from an H1 straight to an H4. It was the only problem we found on all ten. It is also one of the easiest to fix once you know where the headings come from. This guide shows how to find them and fix them without changing how your store looks.

Why heading levels matter

Many screen reader users move around a page by jumping from heading to heading, the way a sighted shopper scans bold titles. The heading levels (H1 to H6) tell them how the page is organised: an H2 starts a section, an H3 is part of that section, and so on.

The W3C's headings tutorial says that skipping heading ranks "can be confusing and should be avoided where possible", for example an H2 followed directly by an H4. It adds that it is fine to skip ranks when closing subsections, such as going from an H4 back to an H2 (Headings (W3C WAI Page Structure Tutorial)). WCAG's success criterion 1.3.1 asks that structure shown visually, such as headings, is also available in the code (Understanding Success Criterion 1.3.1: Info and Relationships (W3C WAI)), and 2.4.6 asks that headings describe their topic or purpose (Understanding Success Criterion 2.4.6: Headings and Labels (W3C WAI)).

The automated rule that flags this, axe-core's heading-order, is classed by its maker Deque as a best practice with "moderate" impact rather than a failure of a specific WCAG criterion (heading-order: Heading levels should only increase by one (Deque axe rule)). That is a good reason to fix it calmly, not to panic about it. It is still worth fixing, because a clear outline helps every screen reader user who visits.

Step 1: List the headings on a page

Run our free store scan; it reports skipped levels on your home, collection, product and cart pages. To see the full outline yourself, open a page in Chrome, Edge or Firefox, open the developer tools console (F12, then the Console tab) and paste this line:

Browser console
document.querySelectorAll('h1,h2,h3,h4,h5,h6').forEach(h => console.log(h.tagName, '-', h.textContent.trim().slice(0, 60)));

You get a list like H1 - Summer sale, H4 - Free shipping, H2 - Featured products. Any time the number goes up by more than one (H1 to H4 here), that is a skipped level.

Step 2: Decide what the outline should be

Write the page out as a simple outline before touching code:

  • One H1 per page that says what the page is: the product name, the collection name, or your store name on the homepage.
  • H2 for each main section: "Featured products", "Reviews", "Newsletter", footer column titles.
  • H3 for items inside a section, such as product titles in a grid under an H2.

Not everything in bold needs to be a heading. A promotional line like "Free shipping over $50" is usually better as a paragraph.

Step 3: Change the level, not the look

Most skipped levels exist because someone picked a heading tag for its size. The fix is to keep the size in CSS and use the right tag. Many themes already separate the two. For example, in Shopify's Dawn theme the "Image with text" section always outputs an <h2>, and the "Heading size" setting only changes a CSS class on it (sections/image-with-text.liquid in Shopify's Dawn theme (GitHub)). So changing "Heading size" in the theme editor makes the heading look bigger or smaller but does not change its level.

When you edit code, the pattern is the same on any platform: correct tag, visual class for size.

Example: the right level with a smaller look
<!-- Before: an H4 chosen because it looked small -->
<h4>Free shipping on orders over $50</h4>

<!-- After: a paragraph, because it is not a section title -->
<p class="announcement">Free shipping on orders over $50</p>

<!-- Before: a section title that skips from H1 to H4 -->
<h4 class="section-title">Customer reviews</h4>

<!-- After: an H2 that keeps the small look via a class -->
<h2 class="section-title h4">Customer reviews</h2>

Step 4: Fix it in Shopify

  1. Duplicate your theme first so you can preview changes before publishing (Duplicating themes (Shopify Help Center)).
  2. Find the section that outputs the wrong heading. In the theme editor, click the block to see the section name, then open Edit code and look in sections/ for the matching file.
  3. Search the file for <h3, <h4 and so on, and change the tag while keeping the class.
  4. Check product cards. In Dawn, the product title in snippets/card-product.liquid is an <h3> (snippets/card-product.liquid in Shopify's Dawn theme (GitHub)), which works when the grid sits under an H2 section title. If your theme shows a grid directly under the H1 with no H2 in between, add a section heading (a visible one is best).
  5. Apps add headings too. Review, upsell and pop-up apps often insert their own <h4> or <h5>. Check the app's settings, or ask the developer (see our guide on apps).

Step 5: Fix it in WooCommerce

In WooCommerce, product titles in shop and category grids are printed by woocommerce_template_loop_product_title(), which outputs an <h2> (includes/wc-template-functions.php (WooCommerce, GitHub)). It is attached to the woocommerce_shop_loop_item_title hook (includes/wc-template-hooks.php (WooCommerce, GitHub)). On a normal shop page that is fine: the page title is the H1 and products are H2s. If your homepage puts a product grid under an H2 section title, you may want H3s instead. In a child theme you can swap the function:

wp-content/themes/your-child-theme/functions.php
<?php
// Product titles in loops as H3 instead of H2 (only if your layout needs it).
add_action( 'init', function () {
    remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
    add_action( 'woocommerce_shop_loop_item_title', function () {
        echo '<h3 class="woocommerce-loop-product__title">' . esc_html( get_the_title() ) . '</h3>';
    }, 10 );
} );

Widget titles in classic themes are another common source. WordPress wraps sidebar and footer widget titles in whatever the theme sets as before_title and after_title when it registers the widget area; the default is an H2 (register_sidebar() (WordPress developer reference)). If your footer titles come out as H4s or H5s, the theme chose that. A child theme can re-register the area, or you can ask the theme developer. Our guide to child theme accessibility fixes shows how to set one up safely.

Check your own store in a minute or two. Our free scanner opens your homepage, a collection page, a product page and your cart in a real browser and lists the problems it can detect automatically, in plain English.

Run the free scan

Step 6: Re-scan

Run the console line again, then re-run the scan. Expect a few judgment calls: a footer that goes from H3 back to H2 is fine, as the W3C notes (Headings (W3C WAI Page Structure Tutorial)). What you want to remove are jumps down the levels.

Common questions

Is it a problem to have more than one H1?

The axe rule for heading order doesn't require exactly one H1. Our checker separately flags pages with no H1. A single H1 that names the page is the simplest, clearest pattern for a store.

Can I just hide headings I don't like?

Don't hide real section titles. If a section has no visible title but needs one for structure, a visually hidden heading is acceptable, but a visible title helps everyone.

Will fixing headings hurt my design?

No, if you keep the existing CSS class for size. The page should look identical; only the outline changes.

Technical fixes, not legal advice. This guide explains website accessibility from a technical point of view. We are not a law firm, and nothing here is legal advice. No scan, fix or guide can guarantee legal compliance, the outcome of any demand letter or lawsuit, or protection from future claims. If you have received a legal claim, please consult a qualified attorney about it.

Sources