Semantics
Styled paragraphs are not headings
- Rule:
p-as-heading - Severity: Serious
- WCAG level A
Why it matters
A bold paragraph looks like a heading but is not one. Screen reader users navigate a page by jumping between headings, and a fake heading is not in that list — the section is invisible in the outline.
How to fix it
- Use <h2> to <h6> for section titles and style them however the design needs.
- Keep the levels in order, without skipping, so the outline matches the visual hierarchy.
- Reserve bold text for emphasis inside a paragraph.
In markup
<p><strong>Pricing</strong></p>
<p>Three plans...</p><h2>Pricing</h2>
<p>Three plans...</p>The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 1.3.1 Info and Relationships (opens in new tab) — WCAG level A
Further reading
Deque University on p-as-heading (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.