Headings must not be empty
Each heading should contain text that tells users what the following section is about. This is a best practice, not a WCAG requirement, but empty headings make heading navigation confusing.
| Rule ID | empty-heading |
|---|---|
| Impact | Minor |
| Success criterion | Best practice, not a WCAG requirement |
| Needs a change in the website’s code |
Example
<h2 class="section-title"></h2>
<p>Free delivery on orders over $50.</p>A screen reader lists “heading level 2” with no text in the headings list.
<h2 class="section-title">Delivery and returns</h2>
<p>Free delivery on orders over $50.</p>The headings list shows “Delivery and returns, heading level 2”.
Why it matters
Many screen reader users explore a page by jumping from heading to heading or by opening a list of all headings. An empty heading appears in that list as a blank entry or just “heading level 2”, which wastes a step and suggests that content is missing. If several are empty, the outline becomes useless for skimming.
Empty headings are often left behind by page builders, CMS templates with an unfilled field, or elements used only for spacing. Sighted users never notice them, so they survive for years. Search engines also read headings to understand page structure, so a clean outline helps there as well.
How to fix it
Decide whether the heading should exist at all.
It marks a real section. Add short, descriptive text:
<h2>Opening hours</h2>
It is used only for spacing or styling. Replace it with a neutral element and style that:
<div class="spacer-lg"></div>
The text is filled in by a CMS field or script. Do not output the heading when the field is empty:
{% if section.title %}
<h2>{{ section.title }}</h2>
{% endif %}
The heading contains only an icon or image. Give the image an alt that names the section:
<h2><img src="reviews-icon.svg" alt="Customer reviews"></h2>
The text is visually hidden on purpose. Keep it available to screen readers with a visually-hidden class instead of display: none, so the heading still has a name.
Checklist
- Give every heading descriptive text.
- Replace spacing headings with styled div elements.
- Skip heading output when a CMS field is empty.
- Add alt text to images used as heading content.
How the check works
The check looks at <h1> to <h6> and elements with role="heading" that are visible to assistive technology. It passes when the heading has an accessible name from its text, an image alt, aria-label or aria-labelledby. It fails when the name is empty or whitespace. Whether the text describes the section well still needs a manual look.
Resources
- W3C ACT rule ffd0e9 W3C ACT
- Headings W3C WAI
Updated October 27, 2026