Landmarks are prominent sections of content on a page.
Screen readers like JAWS and NVDA lets you navigate between landmarks with keyboard shortcuts. Voiceover does not have keyboard shortcut, but it has a command.
| Screen reader | Next landmark shortcut |
|---|---|
| JAWS | R |
| NVDA | D |
There are 8 landmark roles.
- banner
- complementary
- contentinfo
- form
- main
- navigation
- region
- search
7 of these 8 landmarks are built into HTML.
| Landmark | HTML Element |
|---|---|
| Banner | <header> when not used in other landmarks |
| Complementary | <aside> |
| Contentinfo | <footer> when not used in other landmarks |
| Form | <form> |
| Main | <main> |
| Navigation | <nav> |
| Region | <section> when it has an accessible name |
| Search | NA |
Explanation of each role
Banner represents general information thatโs placed at the top of the page. It usually includes the logo, company name, and the main navigation. The <header> element has an implicit banner role if itโs not placed in other landmarks.
<header>...</header>Complementary represents supporting information thatโs related to the main content. The <aside> element has an implicit complementary role.
<aside>...</aside>Contentinfo is used to identify information at the end of every page. The <footer> element has an implicit contentinfo role if itโs not placed in other landmarks.
<footer>...</footer>Form denotes a form. The <form> element has an implicit form role.
<form>...</form>Main is used to identify the main content of the page. The <main> element has an implicit main role.
<main>...</main>Navigation is used to identify groups of links for navigating through a website or content. The <nav> element has an implicit navigation role.
<nav>...</nav>Region is a generic landmark role. It is used to identify areas that are significant (but donโt fall into other landmark roles). The <section> element has an implicit region role if it is given an accessible name.
Accessible names are really important. Weโll talk about accessible names in a later lesson.
<section aria-label="Section title">...</section>Search identifies a form thatโs used for search. This is the only landmark role thatโs not bulit into a HTML element.
<form role="search">...</form>Exposing landmarks
At the time of writing, NVDA and Voiceover announce (or expose) all landmark elements except for region and form.
Letโs say you have this HTML.
<header>Header</header><aside>Aside</aside><footer>Footer</footer><form>Form</form><main>Main</main><nav>Navigation</nav><section>Section</section><form role="search">Search</form>Hereโs what youโll hear on a screen reader if you use the โNext Itemโ command to walk through every element.
Both NVDA and Voiceover will read form and region roles if you provide them
with an accessible name. You can do this with aria-label and
aria-labelledby. (More on these properties in accessible names and
descriptions).
Note: Voiceover announces the form role as group in Safari v13.0.3. Also, it also announces region as empty region if there are no HTML tags within the region.
<form aria-label="login form">Form</form><section aria-label="section">Section</section>Scott OโHara kept an updated blog post about whether screen readers expose landmark roles correctly.
What you need to know
You need to know the HTML elements for each landmark role. Here they are again:
| Landmark | HTML Element |
|---|---|
| Banner | <header> when not used in other landmarks |
| Complementary | <aside> |
| Contentinfo | <footer> when not used in other landmarks |
| Form | <form> |
| Main | <main> |
| Navigation | <nav> |
| Region | <section> when it has an accessible name |
Thatโs it!
Welcome! Unfortunately, you donโt have access to this lesson. To get access, please purchase the course or enroll in Magical Dev School.
Unlock this lesson