Skip to main content
Checks that heading elements have visible content
Rule IDa11y/empty-heading
CategoryAccessibility
ScopePer-page
Severitywarning
Weight5/10

Solution

Headings (h1-h6) must have text content for screen readers to announce. Empty headings create confusing navigation. Either add text content, use aria-label, or remove the empty heading element.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["a11y/empty-heading"]

Disable all Accessibility rules

squirrel.toml
[rules]
disable = ["a11y/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/empty-heading"]
disable = ["*"]