From 3c04b80929b9294edd75e05a39b7e6630a6b6e1d Mon Sep 17 00:00:00 2001
From: fstrr Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide programmatic access to sections of a web page. Landmark roles (or "landmarks") programmatically identify sections of a page. Landmarks help assistive technology (AT) users orient themselves to a page and help them navigate easily to various sections of a page. Landmarks also provide an easy way for users of assistive technology to skip over blocks of content that are repeated on multiple pages and notify them of programmatic structure of a page. For instance, if there is a common navigation menu found on every page, landmarks can be used to skip over it and navigate from section to section. This will save assistive technology users and keyboard users the trouble and time of tabbing through a large amount of content to find what they are really after, much like a traditional "skip links" mechanism. A blind user who may be familiar with a news site's menu, and is only interested in getting to the top story, could easily navigate to the "main" landmark, and bypass dozens of menu links. In another circumstance, a user who is blind may want to quickly find a navigation menu, and can do so by jumping to the navigation landmark. Landmarks also can help sighted keyboard-only users navigate to sections of a page using a browser plugin Landmarks are inserted into the page when certain semantic HTML elements are added to a web page. These elements are: There are cases when a particular landmark role can be used more than once on a page, for example, primary and secondary blocks of navigation. In these cases, identical roles should be labeled using a valid technique for labelling regions. Landmarks are interpretable by WAI-ARIA-aware assistive technologies and are not exposed by browsers directly to users. It is a best practice to include all content on the page in landmarks, so that screen reader users who rely on landmarks to navigate from section to section do not lose track of content. The following example shows how landmarks might be added to an HTML document: The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page. For instance, if a The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label: The following example shows a search form. A Technologies that support Accessible Rich Internet Applications (WAI-ARIA). The purpose of this technique is to provide programmatic access to sections of a web page. Landmark roles (or "landmarks") programmatically identify sections of a page. Landmarks help assistive technology (AT) users orient themselves to a page and help them navigate easily to various sections of a page.
- The purpose of this technique is to provide programmatic access to sections of a web page. Landmark roles (or "landmarks") programmatically identify sections of a page. Landmarks help assistive technology (AT) users orient themselves to a page and help them navigate easily to various sections of a page. They also provide an easy way for users of assistive technology to skip over blocks of content that are repeated on multiple pages and notify them of programmatic structure of a page. For instance, if there is a common navigation menu found on every page, landmark roles (or "landmarks") can be used to skip over it and navigate from section to section. This will save assistive technology users and keyboard users the trouble and time of tabbing through a large amount of content to find what they are really after, much like a traditional "skip links" mechanism. (Refer to User Agent Notes above for specifics of AT support). A blind user who may be familiar with a news site's menu, and is only interested in getting to the top story could easily navigate to the "main" landmark, and bypass dozens of menu links. In another circumstance, a user who is blind may want to quickly find a navigation menu, and can do so by jumping to the navigation landmark.
Landmarks also can help sighted keyboard-only users navigate to sections of a page using a browser plugin.
- Landmarks are inserted into the page using the role attribute on an element that marks the section. The value of the attribute is the name of the landmark. These role values are listed below:
+ Landmarks also can help sighted keyboard-only users navigate to sections of a page using a browser plugin.
Landmarks are inserted into the page using the role attribute on an element that marks the section. The value of the attribute is the name of the landmark. These role values are listed below: There are cases when a particular landmark role could be used more than once on a page, such as on primary and secondary navigation menus. In these cases, identical roles should be disambiguated from each other using a valid technique for labelling regions (see examples below).
- Landmarks should supplement native semantic markup such as HTML headings, lists and other structural markup. Landmarks are interpretable by WAI-ARIA-aware assistive technologies and are not exposed by browsers directly to users.
- It is a best practice to include ALL content on the page in landmarks, so that screen reader users who rely on them to navigate from section to section do not lose track of content.
- There are cases when a particular landmark role could be used more than once on a page, such as on primary and secondary blocks of navigation. In these cases, identical roles should be labeled using a valid technique for labelling regions. Landmarks should supplement native semantic markup such as HTML headings, lists and other structural markup. Landmarks are interpretable by WAI-ARIA-aware assistive technologies and are not exposed by browsers directly to users. It is a best practice to include all content on the page in landmarks, so that screen reader users who rely on them to navigate from section to section do not lose track of content. The following example shows how landmarks might be added to an HTML4 or XHTML 1.0 document: The following example shows a best practice of how landmarks might be added to an HTML4 or XHTML 1.0 document in situations where there are more than two of the same type of landmark on the same page. For instance, if a navigation role is used multiple times on a Web page, each instance may have a unique label specified using The following example shows how landmarks might be added to an HTML document:Using HTML landmarks to identify regions of a page
+
+ When to Use
+ Description
+
+
+
+
+ header
is a direct child of the body
element, it creates a banner
role, a region that typically contains the site's logo, name, and other persistent site-wide content at the top of a page.section
element isn't exposed as a landmark region unless it has an accessible name.form
element isn't exposed as a landmark region unless it has an accessible name.body
element, contains information about the page such as copyrights and links to privacy statements.Examples
+
+ Simple landmarks
+ <header> site logo and name, etc. here </header>
+<form aria-label="site search"> search functionality here </form>
+<nav> a list of navigation links here </nav>
+<main> the page's main content here </main>
+<section> a sponsor's promotion here </aside>
+<aside> sidebar content here </aside>
+<footer> site contact details, copyright information, etc. here </footer>
+ Multiple landmarks of the same type and aria-labelledby
+
+ nav
element is used multiple times on a page, each instance may have a unique label specified using aria-labelledby
:<nav aria-labelledby="site-nav-heading">
+ <h2 id="site-nav-heading">Site</h2>
+ <ul>
+ <li>nav link 1</li>
+ <li>nav link 2</li>
+ <li>nav link 3</li>
+ </ul>
+</nav>
+<nav aria-labelledby="related-nav-heading">
+ <h2 id="related-nav-heading">Related Topics</h2>
+ <ul>
+ <li>topic link 1</li>
+ <li>topic link 2</li>
+ <li>topic link 3</li>
+ </ul>
+</nav>
+ Multiple landmarks of the same type and aria-label
+
+ <nav aria-label="Site">
+ <ul>
+ <li>nav link 1</li>
+ <li>nav link 2</li>
+ <li>nav link 3</li>
+ </ul>
+</nav>
+<nav aria-label="Tags">
+ <ul>
+ <li>tag link 1</li>
+ <li>tag link 2</li>
+ <li>tag link 3</li>
+ </ul>
+</nav>
+ Search form
+ form
element must have an accessible name to be exposed as a landmark area:<form aria-labelledby="search-label">
+ <label for="product-search" id="search-label">Search</label>
+ <input id="product-search" placeholder="title, author, or ISBN" type="text">
+ <button type="submit">Find Books</button>
+</form>
+ Tests
+ Procedure
+
+
+ nav
element has been used to mark up a section with navigation links, or the main
element is used to contain the page's main content.nav
elements, examine whether an accurate descriptive label has been given to each one.Expected Results
+
+
+ Resources
+
+
+ Using ARIA landmarks to identify regions of a page
When to Use
+
+
+
+ Using ARIA landmarks to identify regions of a page
+
+ When to Use
Description
- Description
+
-
- banner
: A region that contains the prime heading or internal title of a page.navigation
: A collection of links suitable for use when navigating the document or related documents.main
: Main content in a document. In almost all cases a page will have only one role="main"
.region
: A region that contains a perceivable section of the page containing content that is sufficiently important for users to be able to navigate to the section. A region
landmark isn't exposed as a landmark region unless it has an accessible name.form
: A region of the document that represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing.search
: A region of the page containing search functionality.complementary
: Any section of the document that supports the main content, yet is separate and meaningful on its own.contentinfo
: A region that contains information about the parent document such as copyrights and links to privacy statements.Examples
- Simple landmarks
-
- <div id="header" role="banner">A banner image and introductory title</div>
-<div id="sitelookup" role="search">....</div>
-<div id="nav" role="navigation">...a list of links here ... </div>
-<div id="content" role="main"> ... Ottawa is the capital of Canada ...</div>
-<div id="rightsideadvert" role="complementary">....an advertisement here...</div>
-<div id="footer" role="contentinfo">(c)The Freedom Company, 123 Freedom Way, Helpville, USA</div>
-
- Multiple landmarks of the same type and aria-labelledby
+ Simple landmarks
- aria-labelledby
:
+ <div role="banner"> site logo and name, etc. here </div>
+<div role="search"> search functionality here </div>
+<div role="navigation"> a list of navigation links here </div>
+<div role="form"> a sign-up form here </div>
+<div role="main"> the page's main content here </div>
+<div role="region"> a sponsor's promotion here </div>
+<div role="complementary"> sidebar content here </div>
+<div role="contentinfo"> site contact details, copyright information, etc. here </div>
-
<div id="leftnav" role="navigation" aria-labelledby="leftnavheading"> -<h2 id="leftnavheading">Institutional Links</h2> -<ul><li>...a list of links here ...</li> </ul></div> -<div id="rightnav" role="navigation" aria-labelledby="rightnavheading"> -<h2 id="rightnavheading">Related topics</h2> -<ul><li>...a list of links here ...</li></ul></div>- - -
The following example shows a best practice of how landmarks might be added to an HTML4 or XHTML 1.0 document in situations where there are more than two of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label.
-<div id="leftnav" role="navigation" aria-label="Primary"> -<ul><li>...a list of links here ...</li></ul> </div> -<div id="rightnav" role="navigation" aria-label="Secondary"> -<ul><li>...a list of links here ...</li> </ul></div>- -
The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page. For instance, if a navigation role is used multiple times on a page, each instance may have a unique label specified using aria-labelledby
:
<div aria-labelledby="site-nav-heading" role="navigation"> + <h2 id="site-nav-heading">Site</h2> + <ul> + <li>nav link 1</li> + <li>nav link 2</li> + <li>nav link 3</li> + </ul> +</div> +<div aria-labelledby="related-nav-heading" role="navigation"> + <h2 id="related-nav-heading">Related Topics</h2> + <ul> + <li>topic link 1</li> + <li>topic link 2</li> + <li>topic link 3</li> + </ul> +</div>-
The following example shows a search form with a "search" landmark. The search role typically goes on the form element or a div surrounding the form.
-<form role="search"> -<label for="s6">search</label><input id="s6" type="text" size="20"> -... -</form>+
The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label:
+<div aria-label="Site" role="navigation"> + <ul> + <li>nav link 1</li> + <li>nav link 2</li> + <li>nav link 3</li> + </ul> +</div> +<div aria-label="Tags" role="navigation"> + <ul> + <li>tag link 1</li> + <li>tag link 2</li> + <li>tag link 3</li> + </ul> +</div>+
The following example shows a search form with a "search" landmark. The search
role typically goes on the form
element or a div
surrounding the form:
<form role="search"> + <label for="product-search" id="search-label">Search</label> + <input id="product-search" placeholder="title, author, or ISBN" type="text"> + <button type="submit">Find Books</button> +</form>-
navigation
role has been used to mark up a section with navigation links, or the main
role is used to contain the page's main content.navigation
elements, examine whether an accurate descriptive label has been given to each one.The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label:
<nav aria-label="Site"> <ul> - <li>nav link 1</li> - <li>nav link 2</li> - <li>nav link 3</li> + <li>< href="...">nav link 1</a></li> + <li>< href="...">nav link 2</a></li> + <li>< href="...">nav link 3</a></li> </ul> </nav> <nav aria-label="Tags"> <ul> - <li>tag link 1</li> - <li>tag link 2</li> - <li>tag link 3</li> + <li><a href="...">tag link 1</a></li> + <li><a href="...">tag link 2</a></li> + <li><a href="...">tag link 3</a></li> </ul> </nav>
nav
element has been used to mark up a section with navigation links, or the main
element is used to contain the page's main content.nav
elements, examine whether an accurate descriptive label has been given to each one.Landmarks are inserted into the page using the role attribute on an element that marks the section. The value of the attribute is the name of the landmark. These role values are listed below:
banner
: A region that contains the prime heading or internal title of a page.navigation
: A collection of links suitable for use when navigating the document or related documents.main
: Main content in a document. In almost all cases a page will have only one role="main"
.navigation
: A region that contains navigation links links to other pages or different parts of the same page.main
: A region that contains a page's main content.region
: A region that contains a perceivable section of the page containing content that is sufficiently important for users to be able to navigate to the section. A region
landmark isn't exposed as a landmark region unless it has an accessible name.form
: A region of the document that represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing.search
: A region of the page containing search functionality.<div aria-labelledby="site-nav-heading" role="navigation"> <h2 id="site-nav-heading">Site</h2> <ul> - <li>nav link 1</li> - <li>nav link 2</li> - <li>nav link 3</li> + <li><a href="...">nav link 1</a></li> + <li><a href="...">nav link 2</a></li> + <li><a href="...">nav link 3</a></li> </ul> </div> <div aria-labelledby="related-nav-heading" role="navigation"> <h2 id="related-nav-heading">Related Topics</h2> <ul> - <li>topic link 1</li> - <li>topic link 2</li> - <li>topic link 3</li> + <li><a href="...">topic link 1</a></li> + <li><a href="...">topic link 2</a></li> + <li><a href="...">topic link 3</a></li> </ul> </div>@@ -82,16 +82,16 @@
The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label:
<div aria-label="Site" role="navigation"> <ul> - <li>nav link 1</li> - <li>nav link 2</li> - <li>nav link 3</li> + <li>< href="...">nav link 1</a></li> + <li>< href="...">nav link 2</a></li> + <li>< href="...">nav link 3</a></li> </ul> </div> <div aria-label="Tags" role="navigation"> <ul> - <li>tag link 1</li> - <li>tag link 2</li> - <li>tag link 3</li> + <li><a href="...">tag link 1</a></li> + <li><a href="...">tag link 2</a></li> + <li><a href="...">tag link 3</a></li> </ul> </div>@@ -112,13 +112,12 @@
navigation
role has been used to mark up a section with navigation links, or the main
role is used to contain the page's main content.navigation
elements, examine whether an accurate descriptive label has been given to each one.Technologies that support Accessible Rich Internet Applications (WAI-ARIA).
+Technologies that support ARIA (Accessible Rich Internet Applications).
The purpose of this technique is to provide programmatic access to sections of a web page. Landmark roles (or "landmarks") programmatically identify sections of a page. Browsers don't expose landmarks directly to users, but they they are made available by assistive technology (AT) to users orient themselves to a page and help them navigate easily to various sections of a page. Landmarks also can help sighted keyboard-only users navigate to sections of a page using a browser plugin.
+The purpose of this technique is to provide programmatic access to sections of a web page. Landmark roles (or "landmarks") programmatically identify sections of a page. Browsers don't expose landmarks directly to users, but they they are made available to them by assistive technology and browser extensions to help navigation to various sections of a page.
-Landmarks provide an easy way for users of assistive technology to skip over blocks of content that are repeated on multiple pages and notify them of programmatic structure of a page. For instance, if there is a common navigation menu found on every page, landmarks can be used to skip over it and navigate from section to section. This will save assistive technology users and keyboard users the trouble and time of tabbing through a large amount of content to find what they are really after, much like a traditional "skip links" mechanism. A blind user who may be familiar with a news site's menu, and is only interested in getting to the top story, could easily navigate to the "main" landmark, and bypass dozens of menu links. In another circumstance, a user who is blind may want to quickly find a navigation menu, and can do so by jumping to the navigation landmark.
+Landmarks provide an easy way for users of assistive technology understand the programmatic structure of a page and skip over content they're not interested in. For instance, if a site's header, global navigation, main content area, and footer are marked up as landmarks, a screen reader user can easily skip to the landmark they're interested in without having to work their way through all the preceding content. A blind user who may be familiar with a news site's menu, and is only interested in getting to the top story, could easily navigate to the "main" landmark, and bypass dozens of menu links. In another circumstance, a user who is blind may want to quickly find a navigation menu, and can do so by jumping to the navigation landmark.
-Landmark regions are implicitly created when certain semantic HTML elements are used. This is different from using ARIA to explicitly create landmarks. Landmarks are created when certain semantic HTML elements are added to a web page. These elements are:
+Landmark regions are implicitly created when certain semantic HTML elements are used, which is different from using ARIA to explicitly create landmarks. These elements are:
header
is a direct child of the body
element, it creates a banner
role, a region that typically contains the site's logo, name, and other persistent site-wide content at the top of a page.section
element isn't exposed as a landmark region unless it has an accessible name.form
element isn't exposed as a landmark region unless it has an accessible name.body
element, contains information about the page such as copyrights and links to privacy statements.<header>
: When a header
is a direct child of the body
element, it creates a banner
role, a region that typically contains the site's logo, name, and other persistent site-wide content at the top of a page.<nav>
: A region that contains navigation links to other pages or different parts of the same page.<main>
: A region that contains a page's main content.<section>
: A region that contains a generic section of a document or application. A section
element isn't exposed as a landmark region unless it has an accessible name.<form>
: A region of the document that represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing. A form
element isn't exposed as a landmark region unless it has an accessible name.<aside>
: A region of the document that supports the main content, yet is separate and meaningful on its own.<footer>
: A region that, when its nearest ancestor is the body
element, contains information about the page such as copyrights and links to privacy statements.Modern web browsers don't need to have the HTML element's related ARIA role added to them to be exposed as a landmark region. For example, <main role="main">
is unnecessary, and should just be <main>
.
Modern web browsers don't need to have the HTML element's related ARIA role added to them to be exposed as a landmark region. For example, <main role="main">
is unnecessary, and should just be <main>
.
There are cases when a particular landmark role can be used more than once on a page, for example, primary and secondary blocks of navigation. In these cases, identical roles should be labeled using a valid technique for labelling regions.
@@ -60,22 +60,22 @@The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page. For instance, if a nav
element is used multiple times on a page, each instance may have a unique label specified using aria-labelledby
:
<nav aria-labelledby="site-nav-heading"> +The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page. For instance, if a
+nav
element is used multiple times on a page, each instance may have a unique label specified usingaria-labelledby
:<nav aria-labelledby="site-nav-heading"> <h2 id="site-nav-heading">Site</h2> - <ul> - <li><a href="...">nav link 1</a></li> - <li><a href="...">nav link 2</a></li> - <li><a href="...">nav link 3</a></li> - </ul> + <ul> + <li><a href="/news">News</a></li> + <li><a href="/weather">Weather</a></li> + <li><a href="/sport">Sport</a></li> + </ul> </nav> <nav aria-labelledby="related-nav-heading"> <h2 id="related-nav-heading">Related Topics</h2> - <ul> - <li><a href="...">topic link 1</a></li> - <li><a href="...">topic link 2</a></li> - <li><a href="...">topic link 3</a></li> - </ul> + <ul> + <li><a href="/local-news">Local News</a></li> + <li><a href="/local-weather">Local Weather</a></li> + <li><a href="/local-sport">Local Sport</a></li> + </ul> </nav>
The following example shows a best practice of how landmarks might be added to an HTML document in situations where there are two or more of the same type of landmark on the same page, and there is no existing text on the page that can be referenced as the label:
-<nav aria-label="Site"> +<nav aria-label="Vehicles"> <ul> - <li>< href="...">nav link 1</a></li> - <li>< href="...">nav link 2</a></li> - <li>< href="...">nav link 3</a></li> + <li><a aria-current="page" href="/cars">Cars</a></li> + <li><a href="/trucks">Trucks</a></li> + <li><a href="/bikes">Bikes</a></li> </ul> </nav> <nav aria-label="Tags"> <ul> - <li><a href="...">tag link 1</a></li> - <li><a href="...">tag link 2</a></li> - <li><a href="...">tag link 3</a></li> + <li><a href="/cars-electric">Electric Cars</a></li> + <li><a href="/cars-gas">Gas-powered Cars</a></li> + <li><a href="/cars-family">Family Cars</a></li> + <li><a href="/cars-working">Rugged Cars For Working</a></li> + <li><a href="/cars-commuting">Cars For Suburban Commuting</a></li> </ul> </nav>
The following example shows a search form. A form
element must have an accessible name to be exposed as a landmark area:
<form aria-labelledby="search-label"> +The following example shows a search form. A
+form
element must have an accessible name to be exposed as a landmark area:<form aria-labelledby="search-label"> <label for="product-search" id="search-label">Search</label> <input id="product-search" placeholder="title, author, or ISBN" type="text"> <button type="submit">Find Books</button> @@ -115,14 +117,14 @@Tests
Procedure
- Examine each HTML element that creates a landmark role.
-- Examine whether the correct element has been used to mark up content. For example: a
+nav
element has been used to mark up a section with navigation links, or themain
element is used to contain the page's main content.- Examine whether the correct element has been used to mark up content. For example: a
nav
element has been used to mark up a section with navigation links, or themain
element is used to contain the page's main content.- If a landmark region needs to have an accessible name to be exposed as a landmark, check to see that there is an accessible name.