Heading sequence out of order
| Field | Value |
|---|---|
| Rule code | Heading_Sequence_Wrong |
| WCAG conformance level | AA |
| WCAG success criterion | 2.4.6 Headings and Labels |
| Must be fixed at source | No |
Description
Headings provide major title structure to a page and must respect the HTML heading-level order requirements of level-1 through level-6. We detected that the heading sequence on the page was out of order. There can be only one H1 or level-1 heading per page, but there can be numerous additional headings providing that they all work in sequence and do not skip any in between levels. After each succession of heading levels, such as H1 to H2 to H3 to H4, you can start a new heading set from a level-2 heading and then child heading-levels as needed. You should never skip from a level-4 heading to a heading level-6 and you should not go backwards more than one heading-level unless restarting a new heading succession from heading level-2.
How to fix
All headings should follow an outline format. The page's first heading should be an <h1>. Sections under that should use an <h2>, subsections under each <h2> should use an <h3>, and so on. Don't skip heading levels, use them out of order, or use headings for text that isn't part of the page outline.
<h1>Chapter 3</h1>
…
<h2>Section 1</h2>
…
<h2>Section 2</h2>
…
<h3>Subsection A</h3>
<h3>Subsection B</h3>
…
<h2>Section 3</h2>
…