Why this matters
Screen reader users navigate pages by jumping between headings. An empty heading creates a navigation stop that leads nowhere, which is disorienting. Empty headings are often created when developers use heading elements for visual spacing instead of semantic structure.
Code examples
✗ Incorrect — fails WCAG
<h2></h2> <h3> </h3> <!-- Heading with only an icon --> <h2><i class="fas fa-star"></i></h2>
✓ Correct — passes WCAG
<!-- Remove the heading if it serves no purpose --> <!-- Or add meaningful text --> <h2>Featured products</h2> <!-- If icon heading is needed, add text --> <h2> <i class="fas fa-star" aria-hidden="true"></i> Featured </h2> <!-- For visually hidden headings --> <h2 class="sr-only">Navigation</h2>
How to fix it — step by step
- 1Remove any heading elements that have no text content
- 2If you used a heading element for visual spacing, replace it with CSS margin/padding
- 3Never use headings just for their default bold/large styling — use CSS instead
- 4If you need a heading that is visually hidden (for screen readers only), add text with a sr-only CSS class
- 5For headings that contain only icons, add visible or sr-only text describing the section
- 6Audit headings with HeadingsMap browser extension to spot empty headings quickly
Reference: WCAG 2.2 Success Criterion 1.3.1 (Level A)
Test it for free
Use WebPossum to automatically detect this violation and every other WCAG 2.2 issue on your site. Free, instant, no signup required.