Skip to content
Tutorials Center
My learning

Topics

Lesson 9 of 38 ยท Semantic HTML and ARIA

Landmarks and Page Regions

Learn how HTML landmark elements such as header, nav, main, aside and footer give screen reader users a map of the page, and how to label multiple landmarks.

A sighted visitor sees a page's layout at a glance: a header on top, a menu on the side, the main article in the middle. A screen reader user cannot see layout, so browsers expose landmarks, named regions that can be jumped to with one key. Landmarks are created by ordinary HTML elements, so using the right elements gives you a navigable page almost for free.

In this lesson you will learn which element creates which landmark, when each applies, how to label duplicates and how to check your page. Screen readers themselves cannot run in this site's editors, so we verify structure with a script that reads the DOM.

The landmark elements

Element Landmark role Use it for
<header> (top level) banner Site-wide header: logo, site search
<nav> navigation A block of navigation links
<main> main The unique central content, one per page
<aside> complementary Related content outside the main flow
<footer> (top level) contentinfo Copyright, legal and contact links
<section> with a name region A significant area with a heading or label
<form> with a name form A significant form such as search or checkout
<search> search A search form or tool

A <header> or <footer> inside <article>, <section>, <main>, <aside> or <nav> is not a landmark: it is just a header of that piece. And a <section> without an accessible name is generic, so it is not exposed as a landmark at all.

A page with landmarks

header Banner at the top
nav Menus of links
main The one core area
footer Site information

Aside and search are optional extras.

1 / 2

A complete example

A page with landmarks

The dashed labels are just visual aids. Screen reader users can press a shortcut (D in NVDA and JAWS, VO+U rotor in VoiceOver) to hop between these regions.

Labelling multiple landmarks

If a page has two <nav> elements, a screen reader will announce "navigation" twice and the user cannot tell them apart. Give each a unique accessible name with aria-label or, better when a visible heading exists, aria-labelledby.

HTML
<nav aria-label="Main">...</nav>
<nav aria-label="Breadcrumb">...</nav>
<footer>
  <nav aria-label="Legal">...</nav>
</footer>

Do not include the word "navigation" in the label, because the role is already announced: "Main navigation navigation" sounds silly. The same applies to <aside aria-label="Related articles"> and <section aria-labelledby="comments-title">.

What goes outside landmarks?

WCAG advice and common sense say that all content should sit inside a landmark so that a user jumping between regions never skips something. A cookie banner or skip link that sits before the header is the common exception, and skip links are allowed outside.

Landmark audit

The sample fails two checks: two unlabeled navs, and a paragraph outside every landmark. Fix them by adding aria-label to the navs and moving the paragraph into <main>.

Common mistakes

  • Using div for everything. A <div class="header"> has no role. Replace it with <header>.
  • Several <main> elements. Use one. If you build a single-page app, switch which content sits in the main.
  • Too many landmarks. If everything is a landmark, none stand out. Aim for about 5-8 per page.
  • Duplicating roles redundantly. <nav role="navigation"> is harmless but unnecessary, so skip it.
  • Using aria-label on elements with no landmark role. A label on a plain div is ignored by many screen readers.

For pages that use older markup you may see role="banner", role="main" and the like. They still work, but the native elements are preferred. The related ARIA lesson shows when roles are still needed: ARIA basics.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which element creates the main landmark?

    Only <main> (or role="main") exposes the main landmark. An id means nothing to assistive technology.
  2. 2. A page has two navigation menus. What should you do?

    Unique labels such as "Main" and "Breadcrumb" let screen reader users tell the regions apart.
  3. 3. When is a <header> a banner landmark?

    A header inside article, section or main is just that part's header. A top-level header is the banner.
  4. 4. Why avoid the word "navigation" in aria-label="Main navigation"?

    Screen readers announce the role plus the name, so "Main navigation navigation" results.

Summary

  • Landmarks give screen reader users a page map and quick jumps between regions.
  • Use header, nav, main, aside, footer, search and named section or form.
  • Use exactly one <main> and label any landmark that appears more than once.
  • Keep content inside landmarks, and do not overuse them.

Next: Headings and the Document Outline