Skip to content

headingContents

Reports heading elements without accessible content.

✅ This rule is included in the jsx logical preset.

Heading elements (h1 through h6) must have content that is accessible to screen readers. Empty headings provide no value and are misleading to search engine crawlers and users navigating with assistive technologies.

This is required for WCAG 2.4.6 compliance.

<h1 />
<h2></h2>
<h3> </h3>

If you use a framework that automatically injects known good contents for heading elements, you can disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.