< Back to Standards

Headings

Screenshot of a WCAG understanding success criterion page with the headings and levels displayed using the a11yTools accessibility testing tool. There is a main H1 and H2 subheadings displayed.
Heading levels displayed by the a11yTools accessibility testing tool.

Headings are used to give titles to sections and subsections of pages. Headings are often visually styled to be large or bold text compared to the text below the heading.

Impacted Users

Screen reader users need meaningful heading text and proper heading structure to understand the organization of the page and navigate to the content they want to read.

Users with cognitive disabilities need good heading structure and useful heading text to improve the readability and usability of the page.

Designers

Identify heading and subheading text as heading elements at the proper level.

In your designs make sure to annotate the heading text as heading tags with the proper heading level. The goal is to tell the developers what text is heading text and what the correct heading level should be when coded.

✅ Do

Good Design Example
H1 and H2 text properly annotated.
Main heading and subheading text correctly annotated without skipping any levels.

❌ Don't

Bad Design Example
Heading text incorrectly annotated as an H2 for the main heading and a H4 for the next subheading.
The main heading should be an H1 not an H2 and the headings should not skip levels.

Live Figma Example

Headings - Good/Bad Example

Testing for Accessibility

Design Review
  1. Look for heading and subheading text in the design.
  2. Make sure heading and subheading text is annotated in the design.
  3. Make sure headings do not skip levels.
  4. If heading and subheading text is properly annotated in the design then it passes. ✅
  5. If heading or subheading text is not annotated in the design then it fails. ❌
  6. If headings do not skip levels then it passes. ✅
  7. If headings skip levels then it fails. ❌

Content Designers

Write meaningful heading text and markup as heading elements one level below their parent heading.

Heading text must be meaningful and describe the content below the heading. Don't choose heading levels based on the size of the heading, instead make sure the heading is one level below its parent heading and use CSS to control the size.

✅ Do

Good Content Example

See the Pen Heading Structure - Good Example by Paul J. Adam (@pauljadam) on CodePen.

Live Good Content Example

Heading Structure - Good Example

❌ Don't

Bad Content Examples

See the Pen Heading Structure - Bad Example by Paul J. Adam (@pauljadam) on CodePen.

See the Pen Untitled by Paul J. Adam (@pauljadam) on CodePen.

Live Bad Content Examples

Testing for Accessibility

Using Web Inspector
  1. Right Click > Inspect heading and subheading text on the page.
  2. Make sure heading text describes the content below the heading.
  3. Make sure headings are coded one level below their parent/preceding heading.
  4. If heading text describes the content below the heading and headings do not skip levels then it passes. ✅
  5. If heading text does not describe the content below the heading or if headings skip levels then it fails. ❌
Using Screen Reader
  1. Use the screen reader to navigate to each heading on the page or display a list of headings.
  2. Make sure heading text describes the content below the heading.
  3. Make sure headings are coded one level below their parent/preceding heading.
  4. If heading text describes the content below the heading and headings do not skip levels then it passes. ✅
  5. If heading text does not describe the content below the heading or if headings skip levels then it fails. ❌
Using tota11y Bookmarklet
  1. Activate tota11y and check the Headings tool.
  2. Make sure there are no Nonconsecutive heading level used errors.
  3. If there are no Nonconsecutive heading level used errors then it passes. ✅
  4. If there are Nonconsecutive heading level used errors then it fails. ❌

Developers

Code heading text as native heading elements (H1-H6) and properly nest headings without skipping levels.

Don't use CSS to style heading text without using native heading tags. Don't use ARIA for headings unless there's absolutely no other option. Make sure your headings never skip levels, i.e. don't use H1 > H3.

✅ Do

Good Code Example

See the Pen Heading Levels - Good Example by Paul J. Adam (@pauljadam) on CodePen.

Live Good Code Example

Heading Levels - Good Example

❌ Don't

Bad Code Example

See the Pen Heading Levels - Good Example by Paul J. Adam (@pauljadam) on CodePen.

Live Bad Code Example

Heading Levels - Bad Example

Testing for Accessibility

Using Web Inspector
  1. Right Click > Inspect heading and subheading text on the page.
  2. Make sure headings are coded as native heading elements (H1-H6).
  3. Make sure headings do not skip levels.
  4. If headings are coded as native heading elements (H1-H6) then it passes. ✅
  5. If headings are not coded as native heading elements (H1-H6) then it fails. ❌
  6. If headings do not skip levels then it passes. ✅
  7. If headings skip levels then it fails. ❌
Using Screen Reader
  1. Use the screen reader to navigate to each heading on the page or display a list of headings.
  2. Make sure heading text is focused during heading navigation or displayed in the headings list.
  3. Make sure headings are coded one level below their parent/preceding heading.
  4. If heading text is focused during heading navigation, displayed in the headings list, and headings do not skip levels then it passes. ✅
  5. If heading text is not focused during heading navigation, not displayed in the headings list, or if headings skip levels then it fails. ❌

Disabilities Affected

Assistive Technologies Applicable

Design System Documentation

Heading | Duet Design System

ARIA Design Patterns

N/A (Don't use ARIA for headings!)

WCAG Success Criteria

Success Techniques for WCAG

Failure Techniques for WCAG