Sub topic 10
Headings for Screen Reader Users
This chapter covers how people who use screen readers move through headings, and what that means for the way you write and structure them. It assumes you know basic HTML structure (head, body, common tags). It also assumes you have read the earlier chapters on the h1 and on building a heading hierarchy, so you know what a well-formed outline looks like.
Why headings matter beyond search
A screen reader is software that reads a page aloud or sends it to a braille display. It does not show the page as a picture. It reads the page's structure, which the browser exposes through the accessibility tree. This is a simplified copy of the page that lists each element's role, name and state.
Sighted readers scan a page by looking at large, bold text. Screen reader users scan by asking the software for a list of headings. Surveys by WebAIM, an accessibility research group, have repeatedly found that most screen reader users say they navigate long pages by headings first. Headings are therefore the main way a person who cannot see the page builds a picture of it.
This has a practical consequence for SEO work. The same outline that tells a search engine what the page covers also decides whether a person using assistive technology can use the page at all. Good heading practice serves both audiences, and the two rarely conflict.
How screen reader users navigate by headings
Most screen readers offer these ways to use headings:
- Next and previous heading keys. In NVDA and JAWS (two common Windows screen readers), pressing
Hjumps to the next heading andShift+Hjumps to the previous one. VoiceOver on macOS uses its own commands, set through the rotor or Quick Nav. - Level keys. Pressing
1to6jumps to the next heading of that level. Pressing1goes to the next h1, and pressing2goes to the next h2. - A headings list. The user opens a dialog or the VoiceOver rotor that lists every heading on the page, indented by level. This works like a table of contents.
- Announcements. When the cursor lands on a heading, the software says its level and its text, for example "heading level 2, When to repot".
Each of these depends on two things you control: the element you choose and the text you put in it. If you style a <div> to look like a heading, none of these commands will find it.
Real headings versus styled text
A heading must be an actual heading element, h1 to h6. Visual styling alone does not create a heading, and it creates no heading in the accessibility tree.
<!-- Looks like a heading, but is invisible to heading navigation -->
<div class="big-bold-text">Aftercare</div>
<!-- A real heading -->
<h2>Aftercare</h2>The reverse mistake also happens. Some pages use a heading tag only to make text large, such as a promotional line or a sidebar label. Screen reader users then hear a heading that does not describe a section, and their headings list fills with noise. Choose the element for its meaning and use CSS for its size.
<style>
.section-title { font-size: 1.5rem; font-weight: 700; }
.promo-line { font-size: 1.5rem; font-weight: 700; }
</style>
<h2 class="section-title">Choosing a pot</h2>
<p class="promo-line">Free delivery on orders over $40</p>In this example both lines look the same. Only the first is a heading, because only the first begins a section of content.
The headings list as a table of contents
Imagine the page outline from the earlier chapters as the only thing a user hears. Here is the repotting page as a headings list:
<h1>How to Repot a Snake Plant</h1>
<h2>When to repot</h2>
<h2>What you need</h2>
<h3>Choosing a pot</h3>
<h3>Choosing soil</h3>
<h2>Step-by-step repotting</h2>
<h2>Aftercare</h2>A screen reader user who opens the headings list sees this indented outline. They can tell at once that the page has four main sections, and that "What you need" has two parts. They can then jump straight to "Aftercare" without listening to everything before it.
Now apply the same test to the weak outline from the first chapter, which had a vague h1 of "Snake Plant", an h4 of "Snake plant repotting tips snake plant" and an h2 of "More". The user would hear a list that gives no hint of what each section holds, and "More" tells them nothing. The outline also jumps from h1 to h4, so they cannot tell whether they missed content.
Writing heading text that works out of context
In a headings list, each heading appears without the paragraphs around it. The text must make sense on its own. Compare these pairs:
| Weak heading | Better heading | Why it is better |
|---|---|---|
| More | Common repotting mistakes | Names the content |
| Step 3 | Step 3: Loosen the root ball | Gives the action, not only a number |
| Details | Pot size and drainage | Says which details |
| Click here | Where to buy repotting soil | Describes the topic, not an action |
| Tips | Aftercare tips for the first month | Adds scope |
Notice how this matches the keyword advice from earlier chapters. A descriptive heading that includes a natural variation of the target keyword, such as "Choosing soil for a snake plant", helps search engines and listeners at the same time. The test is the same for both: would the heading make sense if you heard only that line?
Keep headings short enough to hear comfortably. A heading of three words is easy to take in. A heading of twenty words read aloud, packed with repeated keywords, is tiring, and it is the same pattern search engines treat as stuffing. The keyword-stuffed h4 from the weak example would be read out in full each time a user lands on it.
Heading levels and the accessibility tree
Heading levels are announced, so skipping them has a real effect. A user who moves from "heading level 2" to "heading level 4" may wonder whether a level 3 section exists that they skipped. This is a reason for the rule you learned earlier: go down one level at a time, and go back up as many levels as you need.
<h1>How to Repot a Snake Plant</h1>
<h2>What you need</h2>
<h3>Choosing a pot</h3>
<h3>Choosing soil</h3>
<h2>Step-by-step repotting</h2>Going from an h3 back to an h2 is correct. It signals that a subsection has ended and a new main section has begun.
One h1 and the main landmark
The earlier chapter on the h1 recommended a single h1 per page. This matters for assistive technology too. Many screen reader users press 1 to jump to the page's main heading and so confirm what page they are on. With several h1 elements, that shortcut gives an unclear answer.
A related feature is the landmark. A landmark is a region of the page with a defined role, such as main, nav, header and footer. Screen readers can jump between landmarks as well as headings. Headings and landmarks work together:
<body>
<header>
<nav aria-label="Primary">...</nav>
</header>
<main>
<h1>How to Repot a Snake Plant</h1>
<h2>When to repot</h2>
<p>...</p>
</main>
<footer>
<h2>About this site</h2>
</footer>
</body>Placing the h1 inside main means the main landmark and the main heading line up. A user who jumps to main lands at the start of the page's content.
Common mistakes
- Using bold text instead of a heading. A
<p><strong>Aftercare</strong></p>looks like a heading but does not appear in the headings list. - Skipping levels to get a smaller font. Use CSS to change size. Keep the levels in order.
- Empty headings. An
<h2></h2>or one that holds only an image without alt text is announced as "heading level 2" with nothing after it. Delete it or give it text. - Headings that hold only an icon. If an icon must stand in for text, add a text alternative.
- Hiding headings with
display: none. This removes them from the accessibility tree too. If you need a heading that is hidden from sight but still read aloud, use a visually hidden CSS class instead. - Using headings for layout. Menu items, buttons and footers rarely need to be headings.
Here is a visually hidden heading, used where the design has no visible title but the section still needs one for navigation:
<style>
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
</style>
<section>
<h2 class="visually-hidden">Related guides</h2>
<ul>
<li><a href="/watering-snake-plants">Watering a snake plant</a></li>
<li><a href="/propagate-snake-plant">Propagating a snake plant</a></li>
</ul>
</section>Checking your headings with assistive technology
You do not need to be an expert screen reader user to check basic structure. Three practical checks:
- Browser accessibility tools. The Accessibility panel in Chrome or Firefox developer tools shows the accessibility tree, including each heading's role and level.
- A headings outline extension. Tools such as the WAVE extension or HeadingsMap display the page's outline as an indented list. Compare it with the outline you intended.
- A short screen reader session. Turn on NVDA (free on Windows) or VoiceOver (built into macOS), open the headings list, and read your outline with no other context. Then press
Hrepeatedly and listen.
When you review the list, ask these questions:
- Does exactly one
h1exist, and does it name the page topic? - Does each level follow the one above it with no gaps?
- Does each heading make sense without the text around it?
- Are there any empty headings or headings used only for style?
- Could a listener tell what the whole page covers from the headings alone?
Add these checks to the audit routine from the final chapter of this tutorial. They take only a few minutes per page and often find problems that title and keyword checks miss.
Exercise
A page's designer wants a promotional banner reading "Free delivery over $40" to look like a large bold heading. The developer writes it as an h2 so it gets the right size. Name two problems this causes for screen reader users and give the better solution.
Show answer
First, the banner appears in the headings list as a section title, so the list is cluttered with an entry that does not start a section of content. Second, because it is an h2, the user hears "heading level 2" and expects a section to follow, and may also be confused about where the page's real sections begin. The better solution is to write the banner as a paragraph or other non-heading element and use CSS (font-size and font-weight) to make it look large and bold.
Exercise
A page has this outline: h1 "Snake Plant Care", h3 "Watering", h3 "Light", h2 "More". List the accessibility problems for someone who navigates by headings, and write a corrected outline.
Show answer
The outline jumps from h1 to h3, so the user may think an h2 section was skipped. The "More" heading says nothing about its content and makes no sense in a headings list. A corrected outline is: h1 "Snake Plant Care", h2 "Watering", h2 "Light", h2 "Common care problems". If "Watering" and "Light" belong under a shared section, an h2 such as "Basic care needs" could contain them as h3 headings.
Exercise
You add a heading with the class "display: none" that reads "snake plant repot snake plant soil pot". Why is this a bad choice for both accessibility and SEO?
Show answer
display: none removes the heading from the accessibility tree, so screen reader users never hear it, and it provides no navigation benefit. It is also hidden text written only for ranking and is made of repeated keywords, which is the pattern search engines treat as keyword stuffing. A heading should name a real, visible (or visually hidden but still read) section for users.