Glossary

Landmark role

Landmark roles divide a page into named regions — banner, navigation, main, complementary, contentinfo, search, form — so that assistive technology can present them as a list and let a user jump straight to one. They are the structural equivalent of headings, operating at the level of the page rather than the content. In HTML they come free from the sectioning elements, and writing the roles by hand is almost never necessary.

The native elements that provide them

`<header>` at the top level of the document gives `banner`, and `<footer>` at the top level gives `contentinfo`. Inside an `<article>` or `<section>` neither produces a landmark, which is correct.

`<nav>` gives `navigation`, `<main>` gives `main`, and `<aside>` gives `complementary`.

`<form>` gives the `form` landmark only when it has an accessible name, and `<section>` gives `region` only under the same condition — an unnamed one would be a landmark called nothing.

`role="search"` has no native element and is the one commonly written by hand, on the form containing a site search.

Labelling repeated landmarks

A page with several `<nav>` elements presents several navigation landmarks with nothing to distinguish them.

`aria-label` or `aria-labelledby` names each one: "Main", "Breadcrumb", "Footer". The label should not repeat the word navigation, since the role is already announced.

Where a visible heading introduces a region, `aria-labelledby` pointing at it is better than a separate `aria-label`, because the two cannot then drift apart.

A single landmark of a kind needs no label; the role is unambiguous on its own.

How the page should be covered

Every part of the page should sit inside some landmark. Content outside all of them is reachable but is not presented in the regional overview, so a user navigating by landmark can miss it.

There should be exactly one `main`, containing the page's primary content and excluding the header, navigation and footer.

`banner` and `contentinfo` should appear once each at the top level.

Too many landmarks is its own problem: a list of fifteen regions is no more useful than no list at all.

A skip link and a landmark structure complement each other rather than substituting: the link serves a keyboard user going forward, the landmarks serve a screen reader user jumping anywhere.

How to check them

The browser's accessibility tree view shows the landmark structure directly, and screen reader extensions present the same list a user would get.

Check for a `main` element, for content outside every landmark, and for repeated landmarks of the same role without distinguishing labels.

Verify the header and footer are at the top level of the document, since nesting them inside a section silently removes the landmark.

Using a screen reader's landmark navigation on a real page is a two-minute test that finds what inspection does not.

Check the labels read sensibly out of context. "Main" and "Footer" are announced with the role already stated, so a label repeating the word navigation produces "Main navigation navigation".

Frequently asked questions

Do I need to write role attributes for landmarks?
Rarely. The HTML sectioning elements provide the roles. Only search has no native element and is commonly written by hand.
Can a page have more than one main?
No. There should be exactly one main landmark holding the page's primary content.
Why does my header not appear as a landmark?
Because it is nested inside an article or section. Only a top-level header produces the banner role.

Sources

Related

VeriFixScan crawls a site and applies its checks to every page it reaches, keeping the evidence behind each finding. Scanning one website is free.

Scan a website