Fix heading-order in Shopify Liquid
Shopify themes routinely skip heading levels because merchants pick <h4> or <h5> in theme settings to get smaller visual text for announcement banners, product cards, or footer columns—jumping directly from <h1> to <h4>. Keeping semantic <h2> / <h3> elements while applying Dawn's .h4 or .h5 visual utility classes preserves design while restoring a clean outline.
Before and after
{%- comment -%} sections/featured-collection.liquid (Broken: skips h2 & h3 straight to h4) {%- endcomment -%}
<section class="featured-collection">
<h1>{{ section.settings.title | escape }}</h1>
<div class="grid">
{%- for product in section.settings.collection.products limit: 4 -%}
<article class="card">
<h4>{{ product.title | escape }}</h4>
</article>
{%- endfor -%}
</div>
</section>{%- comment -%} sections/featured-collection.liquid (Fixed: sequential h2 -> h3 + visual .h4 class) {%- endcomment -%}
<section class="featured-collection">
<h2 class="title h1">{{ section.settings.title | escape }}</h2>
<div class="grid">
{%- for product in section.settings.collection.products limit: 4 -%}
<article class="card">
<h3 class="card__heading h4">
<a href="{{ product.url }}" class="full-unstyled-link">
{{ product.title | escape }}
</a>
</h3>
</article>
{%- endfor -%}
</div>
</section>Fixed vs. broken example
Decouple visual typography from semantic heading depth: choose <h1>–<h6> strictly for document outline nesting and apply CSS utility classes for font size.
Playwright + axe-core check
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";
test("Shopify homepage and collection pages follow sequential heading-order", async ({ page }) => {
await page.goto("/collections/all");
const results = await new AxeBuilder({ page })
.withRules(["heading-order"])
.analyze();
expect(results.violations).toEqual([]);
});Template deduplication tip
A footer column heading rendered as <h5> in sections/footer.liquid or product card titles jumping from <h1> to <h4> in snippets/card-product.liquid fire on every page. Fixing that one Liquid partial clears the entire store.
What NVDA and VoiceOver announce
Over 67% of screen-reader users navigate long pages primarily by jumping between headings (H / 1–6 keys). Skipping from <h1> straight to <h4> for visual sizing breaks the mental document outline and makes sub-sections appear orphaned.
NVDA (Windows)
"Accessibility Audit Report, heading level 1" -> "Key Template Clusters, heading level 4" (user suspects missed sections 2 & 3)
"Accessibility Audit Report, heading level 1" -> "Key Template Clusters, heading level 2"
VoiceOver (macOS / iOS)
"heading level 1, Accessibility Audit Report" -> "heading level 4, Key Template Clusters"
"heading level 1, Accessibility Audit Report" -> "heading level 2, Key Template Clusters"
Common questions
Should my Shopify store logo in sections/header.liquid be an <h1>?
What heading level should Shopify footer columns use?
How does Dawn's heading_size schema setting avoid heading-order bugs?
h0, h1, h2) separately from the HTML tag (<h2>), allowing merchants to change visual size without breaking semantic heading hierarchy.Test a URL for heading-order
Enter any public URL for a free WCAG 2.2 AA check—no account or credit card required.
Managing Shopify Liquid client sites? Monitor 15 sites on one flat plan with white-label portals and branded executive PDFs—$1,140/yr ($95/mo billed annually, 24-month rate lock + onboarding) for Founding 10 agencies.