Structure and landmarks Rule

Use real headings, not bold paragraphs p-as-heading

A paragraph made bold or bigger looks like a heading to a sighted reader. To a screen reader it is a paragraph. People who navigate by headings, which is most screen reader users, jump from heading to heading and never land on it. Use h1 to h6 for anything that acts as a heading, and get the look with CSS.

Websight does not run this check. axe-core marks the p-as-heading rule as experimental, and rules with that tag are skipped when scanning by WCAG level. Other tools may still report it as Styled <p> elements must not be used as headings. Test it by hand using the steps below.

Who it affects

A resident who is blind, reading the parish council newsletter presses H to move through the sections and lands nowhere, because 'Planning applications' and 'Road closures' are bold paragraphs.

Someone with a cognitive disability who uses a page outline tool sees an empty outline, so cannot get an overview before reading.

Someone using reader view on their phone gets a wall of text, because the browser has nothing to break it on.

Broken versus fixed

Both examples are live and rendered in a sandboxed frame. The broken one is deliberately broken.

Broken

Screen reader heading list: empty. The bold lines are announced as plain paragraphs.

Fixed

Screen reader heading list: Planning applications, Road closures. Pressing H jumps between them. The look is the same.

Show the markup behind both examples
Broken
<style>body{font-family:Georgia,serif;margin:0;padding:16px;line-height:1.45;font-size:15px}p{margin:0 0 6px}.title{font-weight:700;font-size:17px;margin-top:8px}</style>
<p class="title">Planning applications</p>
<p>Two applications were received this month, both for single-storey rear extensions on Mill Lane.</p>
<p class="title">Road closures</p>
<p>Church Street closes for resurfacing from 3 to 7 November.</p>
Fixed
<style>body{font-family:Georgia,serif;margin:0;padding:16px;line-height:1.45;font-size:15px}p{margin:0 0 6px}h2{font-weight:700;font-size:17px;margin:8px 0 2px}</style>
<h2>Planning applications</h2>
<p>Two applications were received this month, both for single-storey rear extensions on Mill Lane.</p>
<h2>Road closures</h2>
<p>Church Street closes for resurfacing from 3 to 7 November.</p>

Test it by hand in two minutes

  1. Open the heading list: the VoiceOver rotor (Ctrl+Option+U), NVDA's elements list (Insert+F7), or the HeadingsMap browser extension. Every visible section title should be in it.
  2. Find a section title on screen that is missing from the list. Right click it and choose Inspect. If it is a p, b, strong, span or div, it is a fake heading.
  3. Check the levels make sense once fixed: the page title is h1, sections h2, subsections h3.

The fix

Before
<p><strong>Planning applications</strong></p>
<p>Two applications were received this month.</p>
After
<h2>Planning applications</h2>
<p>Two applications were received this month.</p>

Pick the level from its place in the outline, not from the size you want. Size and weight belong in the CSS for h2.

Heading styled with a class on a div

Before
<div class="section-title">Road closures</div>
After
<h2 class="section-title">Road closures</h2>

Keep the class so the styling does not change.

Keeping the old look

Before
p.title { font-weight: 700; font-size: 17px; margin-top: 8px; }
After
h2 { font-weight: 700; font-size: 17px; margin: 8px 0 2px; }

If the bold paragraph was the house style, give the h2 the same CSS. Nobody sighted will notice the change.

A bold lead-in that is not a heading

Before
<h3>Note:</h3>
<p>the office is closed on Friday.</p>
After
<p><strong>Note:</strong> the office is closed on Friday.</p>

Not every bold phrase is a heading. A lead-in word that starts a sentence stays in the paragraph.

Common mistakes

  • Choosing a heading level for its default size, then jumping from h2 to h4 to get the look you want.
  • Adding role="heading" to the paragraph without aria-level, or instead of using the real element.
  • Turning every bold phrase into a heading, including labels and warnings inside paragraphs.
  • Wrapping the section title in a link or button with no heading element inside it.

WCAG criteria this rule maps to

axe-core tags this rule as WCAG 2.2 level A. It is a check (not run by Websight) for:

This check is a heuristic: the scanner looks for a short paragraph that is bold, italic or larger than the paragraph after it. It misses fake headings made with divs and spans, and it can flag a bold lead-in sentence that is not a heading, so use the heading list to decide. Automated tools find only part of the accessibility problems on a page; a pass on this rule is not a pass on the criterion.

Scan your own page for the 64 checks Websight does run

Open any page in Chrome, click Websight, and get a score out of 100 with every issue explained and a draft fix snippet per element.

Add Websight to Chrome

Free scans, no account, nothing leaves your computer. Automated tools find only part of the problems; the extension says so on every report.