Landmarks and Landmark Regions
Landmarks are used to provide structure and navigation to a webpage for ease of access to assistive technology users. Landmarks are elements that identify and define the different sections or regions of a web page. Landmarks can be specified using ARIA or Native HTML approach
Note: It is recommended that Native HTML approach be used over ARIA as it has accessibility out of the box.
-
Use HTML elements, such as
<header>
,<nav>
,<main>
,<aside>
,<footer>
,<form>
and<section>
to provide landmarks. -
ARIA equivalent roles to Native HTML elements.
HTML ARIA <header>
role="header"
<main>
role="main"
<footer>
role="contentinfo"
<aside>
role="complementary"
<form>
role="form"
<section>
role="region"
N/A
role="search"
- DO NOT use excess of landmarks on a webpage.
-
Landmarks SHOULD be specified with a unique label in case multiple landmarks of the same
kind are used on the webpage.
-
Landmark regions CAN be given a label or a descriptive name using the
aria-label
oraria-labelledby
attribute, which can assist screen readers in announcing the purpose of the landmark. -
When
aria-labelledby
is used, ensure that landmarks have unique IDs so that screen readers CAN navigate the page easily.
-
Landmark regions CAN be given a label or a descriptive name using the
NOTE:
- New to accessibility or uncertain of requirements, it will be helpful to review all sections below.
- Already familiar with requirements, skip to the “Working Example” section for sample HTML, CSS and JavaScript (when needed), along with a working demo.
Generally, consists of elements such as “Skip to content” link, Logo of the website, navigation links and so on.
-
As per HTML specifications,
<header>
element SHOULD be defined only once in a page. - Header landmark SHOULD be defined using
<header>
element. -
Alternatively,
role="banner"
CAN be given to thediv
element containing the header section.
For example,
<header>
<a href="#content">Skip to content</a>
<a href="#">
<img src="source of the image" alt="Website Logo" height="100" width="100">
</a>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
(...)
</ul>
</nav>
(...)
</header>
Generally, Navigation landmark consists of navigation links that help to navigate to various pages of the website.
- Navigation landmark SHOULD be defined using
<nav>
element. -
Multiple
<nav>
elements CAN be provided on a page.-
SHOULD be differentiated by providing unique and appropriate accessible name
via
aria-label
oraria-labelledby
attribute. - Accessible name SHOULD NOT contain the role information such as “Navigation”.
-
SHOULD be differentiated by providing unique and appropriate accessible name
via
-
Alternatively,
role="navigation"
and accessible name CAN be given to the<div>
element containing the set of links.
For example,
<nav aria-label="primary">
(...)
</nav>
<nav aria-label="Secondary">
(...)
</nav>
Main landmark is the container which contains the primary content of a page.
- Main landmark SHOULD be defined using
<main>
element. - A page SHOULD have only one
<main>
element. -
Alternatively,
role="main"
CAN be given to the<div>
element containing the main content of the page.
For example,
<main>
<h1>Main heading of the page</h1>
(...)
</main>
Complementary landmarks are used to present some information which can be shown separately for the users.
-
Complementary landmark SHOULD be defined using
<aside>
element. -
Multiple complementary landmarks CAN be given on a page.
-
SHOULD be differentiated by providing unique and appropriate accessible
name via
aria-label
oraria-labelledby
attribute. - Accessible name SHOULD NOT contain the role information such as “sidebar”.
-
SHOULD be differentiated by providing unique and appropriate accessible
name via
-
Alternatively,
role="complementary"
CAN be given to the <div> element containing the complementary content.
For example,
<aside aria-label="Latest Annual Report">
(...)
</aside>
Footer or Content info consists of social media links, copyright sign, and so on.
-
The footer landmark SHOULD be defined using
<footer>
element. - A page SHOULD have only one <footer> element.
-
Alternatively,
role="contentinfo"
CAN be given to the<div>
element containing the footer content.
For example,
<footer>
(...)
</footer>
Search landmark contains the search section.
-
role="search"
SHOULD be given to the form element containing Search section.
Note: There&8217;s no HTML equivalent for search landmark.
For example,
<form role="search">
<input type="text" title="Search" name="search" value="">
<button>Search</button>
</form>
Consists of form controls like buttons, input field, dropdown, checkboxes, radio buttons and so on to combine and create a form.
- The form landmark SHOULD be defined using
<form>
element. -
A page CAN have multiple form landmarks.
-
CAN be differentiated by providing unique and appropriate accessible name
via
aria-label
oraria-labelledby
attribute. - Accessible name SHOULD NOT contain the role information such as “form”.
-
CAN be differentiated by providing unique and appropriate accessible name
via
-
Alternatively,
role="form"
CAN be given to the<div>
element containing the form.
For example,
<form aria-label="contact us">
(...)
</form>
A region landmark consists of content that is relevant to a specific or author-specified purpose and sufficiently important such that users can navigate to the section easily.
- The form landmark SHOULD be defined using
<form>
element. -
A page CAN have multiple form landmarks.
-
CAN be differentiated by providing unique and appropriate accessible name
via
aria-label
oraria-labelledby
attribute. - Accessible name SHOULD NOT contain the role information such as “form”.
-
CAN be differentiated by providing unique and appropriate accessible name
via
-
Alternatively,
role="form"
CAN be given to the<div>
element containing the form.
For example,
<section aria-label="Featured Shows Carousel">
(...)
</section>
Well-defined landmarks and landmark regions majorly benefit the below users.
- People with cognitive disabilities
- People with visual disabilities
<header id="nav-menu" aria-label="navigation bar">
<div class="nav-container">
<div class="nav-start">
<a class="logo" href="/"><span>Pearson</span></a>
<nav class="menu">
<ul class="menu-bar">
<li><a class="nav-link" href="#">Home</a></li>
<li><a class="nav-link" href="#">About</a></li>
<li><a class="nav-link" href="#">Service</a></li>
<li><a class="nav-link" href="#">Contact</a></li>
<li><a class="nav-link" href="#">Careers</a></li>
</ul>
</nav>
</div>
<div class="nav-end">
<button id="hamburger" aria-label="hamburger" aria-haspopup="true" aria-expanded="false">
<i class="bx bx-menu" aria-hidden="true"></i>
</button>
</div>
</div>
</header>
<main>
<h1>Landmark</h1>
<div class="container">
<section class="cards">
<article class="card reorder">
<h2><a href="#" id="cardtitle2">StatCrunch</a></h2>
<img src="../common-images/educator-292x146.jpg" alt="" loading="lazy" width="292" height="146">
<p>
Put the power of data in students' hands as they analyze data sets
easily from their text and exercises
</p>
<a href="#" aria-describedby="cardtitle2">Explore StatCrunch</a>
</article>
<article class="card reorder">
<h2><a href="#" id="cardtitle1">Learning Catalytics</a></h2>
<img src="../common-images/student-with-raised-hand-292x146.jpg" alt="" loading="lazy" width="292" height="146">
<p>
Hear from every student when it matters most as they respond using their
own smartphones, tablets or laptops
</p>
<a href="#">Explore Learning Catalytics</a>
</article>
</section>
<aside>
<div class="fld-press-release-report-item">
<div class="press-release-content-box">
<div class="section-heading-content-title">
<h2>Latest Annual Report</h2>
</div>
<div class="section-heading-link-download">
<a href="#" class="button-secondary filelink">Annual Report 2022</a>
</div>
</div>
<div class="press-release-image-box">
<div class="press-release-content-image">
<img src="./ir-landing-media.png" alt="" loading="lazy">
</div>
</div>
</div>
</aside>
</div>
</main>
<footer>
<ul class="footer-link">
<li><a href="#">Terms of Use</a></li>
<li><a href="#">Privacy Statement</a></li>
<li><a href="#">Patent Notice</a></li>
<li><a href="#">Accessibility Statement</a></li>
<li><a href="#">Accessibility Conformance Reports</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
<p>© 1996–2023 Pearson All rights reserved.</p>
</footer>
:root {
--light-grey: #eeeeee;
--border: 1px solid var(--light-grey);
}
ul {
list-style: none;
}
a {
text-decoration: none;
color: inherit;
}
button {
border: none;
background-color: transparent;
cursor: pointer;
color: inherit;
}
.icon {
padding: 0.5rem;
background-color: var(--light-grey);
border-radius: 10px;
}
.logo {
margin-right: 1.5rem;
}
#nav-menu {
border-bottom: var(--border);
}
.nav-container {
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 2rem;
height: 90px;
padding: 1.2rem 3rem;
background-color: #005a70;
}
.menu {
position: relative;
background: #005a70;
color: #fff;
}
.menu-bar li:first-child .dropdown {
flex-direction: initial;
min-width: 480px;
}
.menu-bar li:first-child ul:nth-child(1) {
border-right: var(--border);
}
.menu-bar li:nth-child(n + 2) ul:nth-child(1) {
border-bottom: var(--border);
}
.menu-bar .dropdown-link-title {
font-weight: 600;
}
.menu-bar .nav-link {
font-size: 1rem;
font-weight: 500;
letter-spacing: -0.6px;
padding: 0.3rem;
min-width: 60px;
margin: 0 0.6rem;
color: white;
}
.menu-bar .nav-link:hover,
.dropdown-link:hover {
text-decoration: underline;
}
.nav-start,
.nav-end,
.menu-bar,
.right-container,
.right-container .search {
display: flex;
align-items: center;
z-index: 1000;
}
#hamburger {
display: none;
padding: 0.1rem;
margin-left: 1rem;
font-size: 1.9rem;
}
@media (max-width: 1100px) {
#hamburger {
display: block;
color: #fff;
}
.nav-container {
padding: 1.2rem;
}
.menu {
display: none;
position: absolute;
top: 87px;
left: 0;
min-height: 100vh;
width: 100vw;
}
.menu-bar li:first-child ul:nth-child(1) {
border-right: none;
border-bottom: var(--border);
}
.dropdown {
display: none;
min-width: 100%;
border: none !important;
border-radius: 5px;
position: static;
top: 0;
left: 0;
visibility: visible;
opacity: 1;
transform: none;
box-shadow: none;
}
.menu.show,
.dropdown.active {
display: block;
}
.dropdown ul {
padding-left: 0.3rem;
}
.menu-bar {
display: flex;
flex-direction: column;
align-items: stretch;
row-gap: 1rem;
padding: 1rem;
}
.menu-bar .nav-link {
display: flex;
justify-content: space-between;
width: 100%;
font-weight: 600;
font-size: 1.2rem;
margin: 0;
}
.menu-bar li:first-child .dropdown {
min-width: 100%;
}
.menu-bar > li:not(:last-child) {
padding-bottom: 0.5rem;
border-bottom: var(--border);
}
}
.cards {
flex: 0 1 60%;
margin-right: 20px;
}
.cards h2 {
font-size: 1.25rem;
line-height: 1.5rem;
margin: 10px 0;
color:rgb(0, 102, 204);
}
.cards p {
font-size: 16px;
line-height: 1.5;
}
.cards a {
text-decoration: underline;
}
main {
padding: 10px;
}
section {
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
}
.cards > * {
flex: 0 1 12em;
}
.card {
margin: .75em;
padding: .75em;
border-radius: 3px;
border: 2px #ccc solid;
border-radius: .6em;
background-color: white;
position: relative;
}
img {
width: 100%;
height: auto;
}
.reorder {
display: flex;
flex-direction: column;
}
.reorder img {
max-width: 100%;
order: -1;
}
.cards > * a {
display: block;
color: rgb(0, 102, 204);
}
.cards h2 > a {
text-decoration: none;
}
article:hover {
box-shadow: 10px 10px 5px 2px rgba(0, 0, 0, .4);
}
footer {
position: relative;
bottom: 0;
width: 100%;
text-align: center;
padding: 20px 0;
margin: 0;
background-color: #007fa3;
color: #fff;
}
footer ul li {
list-style: none;
display: inline-block;
padding: 0;
margin: 10px;
}
footer ul li a {
font-size: 14px;
color: #fff;
text-decoration: underline;
}
aside {
background-color: #f2f2f2;
padding: 0;
flex: 0 1 30%;
height: fit-content;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
@media (max-width: 768px) {
.cards {
flex: 0 1 90%;
}
}
.fld-press-release-report-item {
padding: 15px 24px 23px 24px;
float: left;
}
.press-release-content-box {
display: block;
float: left;
max-width: 100%;
}
.section-heading-content-title h2 {
font-size: 1.5rem;
font-weight: 700;
font-stretch: normal;
font-style: normal;
line-height: 1.42;
letter-spacing: 0.5px;
color: #000;
margin-right: 35px;
}
.section-heading-link-download {
padding-top: 20px;
padding-bottom: 20px;
border-top: 4px solid #ae367e;
z-index: 10;
}
.section-heading-link-download a {
position: relative;
display: inline-block;
font-size: 16px;
font-weight: 700;
font-stretch: normal;
font-style: normal;
line-height: 1.5;
letter-spacing: 1px;
color: #000;
width: 100%;
}
.press-release-image-box {
display: block;
float: left;
}
.press-release-content-image {
position: relative;
height: 275px;
width: 212px;
}
.press-release-content-image img {
position: relative;
z-index: 1;
width: 100%;
height: 100%;
}
.press-release-content-image:after {
position: absolute;
content: "";
width: 106px;
height: 132px;
background: #fff;
border-radius: 2px;
z-index: 0;
left: 22px;
margin-top: 22px;
}
.logo {
font-size: 24px;
color: #fff;
}
const hamburgerBtn = document.getElementById("hamburger");
const navMenu = document.querySelector(".menu");
function toggleHamburger() {
navMenu.classList.toggle("show");
hamburgerBtn.setAttribute(
"aria-expanded",
hamburgerBtn.getAttribute("aria-expanded") === "false" ? "true" : "false"
);
}
hamburgerBtn.addEventListener("click", toggleHamburger);
<div id="nav-menu" role="banner">
<div class="nav-container">
<div class="nav-start">
<a class="logo" href="/"><span>Pearson</span></a>
<nav aria-label="Primary" class="menu">
<ul class="menu-bar">
<li><a class="nav-link" href="#">Home</a></li>
<li><a class="nav-link" href="#">About</a></li>
<li><a class="nav-link" href="#">Service</a></li>
<li><a class="nav-link" href="#">Contact</a></li>
<li><a class="nav-link" href="#">Careers</a></li>
</ul>
</nav>
</div>
<nav class="nav-end">
<button id="hamburger" aria-label="hamburger" aria-haspopup="true" aria-expanded="false">
<i class="bx bx-menu" aria-hidden="true"></i>
</button>
</nav>
</div>
</div>
<div role="main" id="main">
<h1>Landmark Region</h1>
<div class="container">
<div class="cards card-container">
<article class="card reorder">
<h2><a href="#" id="cardtitle2">StatCrunch</a></h2>
<img src="../common-images/educator-292x146.jpg" alt="" loading="lazy" width="292" height="146">
<p>
Put the power of data in students’ hands as they analyze data sets
easily from their text and exercises
</p>
<a href="#" aria-describedby="cardtitle2">Explore StatCrunch</a>
</article>
<article class="card reorder">
<h2><a href="#" id="cardtitle1">Learning Catalytics</a></h2>
<img src="../common-images/student-with-raised-hand-292x146.jpg" alt="" loading="lazy" width="292" height="146">
<p>
Hear from every student when it matters most as they respond using
their own smartphones, tablets or laptops
</p>
<a href="#">Explore Learning Catalytics</a>
</article>
</div>
<div class="aside" role="complementary" aria-labelledby="content-title">
<div class="fld-press-release-report-item">
<div class="press-release-content-box">
<div class="section-heading-content-title" id="content-title">
<h2>Latest Annual Report</h2>
</div>
<div class="section-heading-link-download">
<a href="#" class="button-secondary filelink">
Annual Report 2022
</a>
</div>
</div>
<div class="press-release-image-box">
<div class="press-release-content-image">
<img src="./ir-landing-media.png" width="281" height="368" alt="">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer" role="contentinfo">
<nav aria-label="Secondary">
<ul class="footer-link">
<li><a href="#">Terms of Use</a></li>
<li><a href="#">Privacy Statement</a></li>
<li><a href="#">Patent Notice</a></li>
<li><a href="#">Accessibility Statement</a></li>
<li><a href="#">Accessibility Conformance Reports</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
<p>© 1996–2023 Pearson All rights reserved.</p>
</div>
:root {
--light-grey: #eeeeee;
}
ul {
list-style: none;
}
a {
text-decoration: none;
color: inherit;
}
button {
border: none;
background-color: transparent;
cursor: pointer;
color: inherit;
}
.icon {
padding: 0.5rem;
background-color: var(--light-grey);
border-radius: 10px;
}
.logo {
margin-right: 1.5rem;
}
#nav-menu {
border-bottom: var(--border);
}
.nav-container {
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 2rem;
height: 90px;
padding: 1.2rem 3rem;
background-color: #005a70;
}
.menu {
position: relative;
background: #005a70;
color: #fff;
}
.menu-bar li:first-child .dropdown {
flex-direction: initial;
min-width: 480px;
}
.menu-bar li:first-child ul:nth-child(1) {
border-right: var(--border);
}
.menu-bar li:nth-child(n + 2) ul:nth-child(1) {
border-bottom: var(--border);
}
.menu-bar .dropdown-link-title {
font-weight: 600;
}
.menu-bar .nav-link {
font-size: 1rem;
font-weight: 500;
letter-spacing: -0.6px;
padding: 0.3rem;
min-width: 60px;
margin: 0 0.6rem;
}
.menu-bar .nav-link:hover,
.dropdown-link:hover {
text-decoration: underline;
}
.nav-start,
.nav-end,
.menu-bar,
.right-container,
.right-container .search {
display: flex;
align-items: center;
z-index: 1000;
}
#hamburger {
display: none;
padding: 0.1rem;
margin-left: 1rem;
font-size: 1.9rem;
}
@media (max-width: 1100px) {
#hamburger {
display: block;
color: #fff;
}
.nav-container {
padding: 1.2rem;
}
.menu {
display: none;
position: absolute;
top: 87px;
left: 0;
min-height: 100vh;
width: 100vw;
}
.menu-bar li:first-child ul:nth-child(1) {
border-right: none;
border-bottom: var(--border);
}
.dropdown {
display: none;
min-width: 100%;
border: none !important;
border-radius: 5px;
position: static;
top: 0;
left: 0;
visibility: visible;
opacity: 1;
transform: none;
box-shadow: none;
}
.menu.show,
.dropdown.active {
display: block;
}
.dropdown ul {
padding-left: 0.3rem;
}
.menu-bar {
display: flex;
flex-direction: column;
align-items: stretch;
row-gap: 1rem;
padding: 1rem;
}
.menu-bar .nav-link {
display: flex;
justify-content: space-between;
width: 100%;
font-weight: 600;
font-size: 1.2rem;
margin: 0;
}
.menu-bar li:first-child .dropdown {
min-width: 100%;
}
.menu-bar > li:not(:last-child) {
padding-bottom: 0.5rem;
border-bottom: var(--border);
}
}
.cards {
flex: 0 1 60%;
margin-right: 20px;
}
.cards h2 {
font-size: 1.25rem;
line-height: 1.5;
margin-bottom: 10px;
color:rgb(0, 102, 204);
}
.cards p {
font-size: 16px;
line-height: 1.5;
}
.cards a {
text-decoration: underline;
}
#main {
margin: 10px;
padding: 0;
}
.card-container {
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
}
.cards > * {
flex: 0 1 10em;
}
.card {
margin: .75em;
padding: .75em;
border-radius: 3px;
border: 2px #ccc solid;
border-radius: .6em;
background-color: white;
position: relative;
}
img {
width: 100%;
height: auto;
}
.reorder {
display: flex;
flex-direction: column;
}
.reorder img {
max-width: 100%;
order: -1;
}
.cards > * a {
display: block;
color: rgb(0, 102, 204);
}
.cards h2 > a {
text-decoration: none;
}
article:hover {
box-shadow: 10px 10px 5px 2px rgba(0, 0, 0, .4);
}
.footer {
position: relative;
bottom: 0;
width: 100%;
text-align: center;
padding: 20px 0;
margin: 0;
background-color: #007fa3;
color: #fff;
}
.footer ul li {
list-style: none;
display: inline-block;
padding: 0;
margin: 10px;
}
.footer ul li a {
font-size: 18px;
color: #fff;
text-decoration: underline;
}
.aside {
background-color: #f2f2f2;
padding: 2px;
margin: 20px;
flex: 0 1 30%;
height: fit-content;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
@media (max-width: 768px) {
.cards {
flex: 0 1 90%;
}
}
.fld-press-release-report-item {
padding: 15px 24px 23px 24px;
float: left;
}
.press-release-content-box {
display: block;
float: left;
max-width: 100%;
}
.section-heading-content-title h2 {
font-size: 1.5rem;
font-weight: 700;
font-stretch: normal;
font-style: normal;
line-height: 1.42;
letter-spacing: 0.5px;
color: #000;
margin-right: 35px;
}
.section-heading-link-download {
padding-top: 20px;
padding-bottom: 20px;
border-top: 4px solid #ae367e;
z-index: 10;
}
.section-heading-link-download a {
position: relative;
display: inline-block;
font-size: 16px;
font-weight: 700;
font-stretch: normal;
font-style: normal;
line-height: 1.5;
letter-spacing: 1px;
color: #000;
width: 100%;
}
.press-release-image-box {
display: block;
float: left;
}
.press-release-content-image {
position: relative;
height: 275px;
width: 212px;
}
.press-release-content-image img {
position: relative;
z-index: 1;
width: 100%;
height: 100%;
}
.press-release-content-image:after {
position: absolute;
content: "";
width: 212px;
height: 275px;
background: #fff;
border-radius: 2px;
z-index: 0;
left: 22px;
margin-top: 22px;
}
.logo {
font-size: 24px;
color: #fff;
}
const hamburgerBtn = document.getElementById("hamburger");
const navMenu = document.querySelector(".menu");
function toggleHamburger() {
navMenu.classList.toggle("show");
hamburgerBtn.setAttribute(
"aria-expanded",
hamburgerBtn.getAttribute("aria-expanded") === "false" ? "true" : "false"
);
}
hamburgerBtn.addEventListener("click", toggleHamburger);