All heading elements contain content

Headings have visible, descriptive text so screen readers can announce them.

On this page

Impact

ScanGov impact ratings

About

A heading with no content or inaccessible text prevent screen reader users from accessing information on the page's structure.

Risks

Screen readers announce empty headings, confusing navigation.

Why it's important

Improves the experience for assistive technology users by ensuring content structure is clear and consistent.

User stories

As an assistive technology user, I want content to be properly structured so that I can navigate and understand the page.

Code

Failing pattern:

<!-- Fail: empty heading -->
<h2></h2>

Passing pattern:

<!-- Pass: heading with content -->
<h2>About this service</h2>

Error

ScanGov messaging when a site fails a standard:

Failed: All heading elements contain content

Guidance

Indicators

On this page