Heading Order
One of the easiest accessibility improvements you can make to a website with big impact is adding headings to break up content and using them in the correct numerical order.
When you’re building websites, always use headings in the correct order to create a meaningful outline on the page. Never choose headings for their style (font, size, or color).
If you have been selecting headings for design, you’re not alone. Skipped heading levels – headings that jump from one number to another randomly, without following a logical order, are one of the most common problems we see in our accessibility audits. Incorrect heading order is also a problem in just about every template kit or off-the-shelf starter theme out there, so if you’re building websites this way, it’s something that you will want to audit for and fix as part of your development process.
Why does heading order matter?
Screen readers and other assistive technologies use headings to provide an outline of the page. There are keyboard shortcuts in screen readers that allow users to hear a list of all the headings on the page and then quickly jump to that specific section. In NVDA, for example, you can press the 2 key and have all H2s on the page read out to you. If the web page doesn’t use any H2s and has skipped them but has H4s or H6s instead, a person might think there are no headings on the page or may not be able to get the information that they need fast enough.
Additionally, the heading numbers are read out as a user goes down the page, and hearing the heading order can help augment their understanding of the content. The Admin Bar home page is a great example of this. There is one heading one that describes the purpose of the web page, then there is an events section with three event callouts, followed by a podcast section with three podcast episodes, followed by a callout section for the Website Owner’s Manual.
HeadingsMap chrome plugin showing the headings on the TAB home page.png
This is the structure of that portion of the page:
What stands out to me here is that if you just heard the names of the events or the podcast episodes, you would have no idea if one was a podcast episode or an event. “New TAB Site Teardown” or “Scaling Your Agency” could just as easily be either an event or a podcast episode. For that matter, “Sell More Care Plans” could also be the name of an event or a podcast episode.
If you can’t see the section layout, the only way you know that these are different sections is if you hear the heading numbers read out to you. When hearing “Heading level two. The Podcast,” it provides important context to what follows. And likewise, when you hear “Heading level two. Sell more care plans” after hearing a list of H3s, you instantly know that you’re in a different section and no longer hearing podcast titles.
(Side note shout out to Kyle for putting that podcast H2 above the podcast episodes in the HTML so that it reads out in the correct order even though it’s visually on the right. )
Make Fewer Things Headings for the Win
If something doesn’t have any sub-content below it, then it’s not a heading. This would include blog post titles in a list of posts without an excerpt or large accent text.
Because us headings to jump to sections, it is really frustrating to jump to a heading expecting more below it and then get nothing – or just another heading.
Likewise, the small accent text that designers like to put above the large headings? It’s probably not a heading at all and should be wrapped in a <p> tag and styled with a class. Or, in other cases, that tiny text is actually more meaningful and should be the H2 which the large text below it should actually not be a heading at all.
How to Check Heading Level
My favorite front-end tool for viewing an outline of the headings on the page and making sure they’re all correctly nested is the HeadingsMap Chrome extension (there’s a Firefox extension too). And, of course, our Accessibility Checker plugin will flag out-of-order headings for you too.
Fixing incorrect heading levels is generally just as easy as finding them because most of these are added in the content editor or page builder. Build the habit of only using headings in proper order and your website visitors with thank you. Bonus: it helps Google understand your page content too.