Skip to content
easeweb
Search topics

Missing or misplaced landmarks, and content outside them

A bookshop's pages are built from divs, or wrap the header, a second main and the footer in one main, so a screen reader's landmark list is empty, or says almost the whole page is the main content.

WCAG 2.2
SC 1.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken <div id="content">
The accessibility problem illustrated: No vision:How do I get to the books?
01

The problem

Screen reader users can't jump to the content, the menu or the footer by landmark, and miss whatever sits outside every landmark.

02

Try it

Use the landmark list to jump to the new releases.

The list shows the landmarks a screen reader finds on this bookshop page. Choose an entry to jump to it. Turn on Show landmarks to see which part of the page each one covers. In Broken 2, where does the first main take you?

Broken Can you fix this?

Screen reader’s landmarks list:

(none)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Put every area of the page in a landmark, with the header, main and footer side by side at the top level.

  1. 1Each page has one main landmark, at the top level, that holds the content and nothing else.
  2. 2The site header and footer are banner and contentinfo landmarks, once each, outside main.
  3. 3Everything on the page sits in a landmark, strips above the header and notices after the footer included.
Before

A page built from divs

<div class="top-bar">Free delivery on orders over $30</div><div class="header">  <a href="/" class="logo">Harbour Books</a>  <div class="menu">    <a href="/fiction">Fiction</a>    <a href="/non-fiction">Non-fiction</a>    <a href="/children">Children</a>    <a href="/events">Events</a>  </div></div><div id="content">  <h1>New releases</h1>  <ul class="books">…</ul></div><div class="footer">  <a href="/contact">Contact</a>  <a href="/returns">Returns</a></div>
After

Header, nav, main and footer elements

<div class="layout">  <header>    <div class="top-bar">Free delivery on orders over $30</div>    <a href="/" class="logo">Harbour Books</a>    <nav>      <a href="/fiction">Fiction</a>      <a href="/non-fiction">Non-fiction</a>      <a href="/children">Children</a>      <a href="/events">Events</a>    </nav>  </header>  <main id="content">    <h1>New releases</h1>    <ul class="books">…</ul>  </main>  <footer>    <a href="/contact">Contact</a>    <a href="/returns">Returns</a>  </footer></div>

Why this fix: Use native HTML first

Fixing this with an AI coding assistant? Get this guide as Markdown, or get every guide in your coding agent.

04

Verify the fix

4 checks, no mouse.

Test with: Screen reader

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat whenever the layout or a third-party widget changes.

Limits

This is a starting pattern, not a guarantee for every application. Paths, class names and the … in the lists are placeholders. Screen readers word the landmark list differently ("content info" or "content information", with "landmark" or "region" after it, or neither), so listen for the areas rather than the exact phrasing. Landmarks give screen reader users a way past the header, and WCAG 2.4.1 accepts them as one, but sighted keyboard users have no landmark keys, so for them the page should still have a skip link past repeated navigation for them. This guide covers whether the page has the right landmarks in the right places. It doesn't cover naming repeated landmarks, for which see navigation landmarks that all sound the same, or the headings inside them, for which see headings chosen by size, not by structure. Test the complete journey with your target assistive technology.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work