Skip to main content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Landmarks

All elements on a page should be contained in a landmark element. This helps users of AT quickly navigate a page. HTML5 provides built in landmark elements such as main, nav, aside, header, footer. When using HTML5 elements, don’t define role.

When using HTML4 use ARIA role on divs to define landmark elements such as role="main".

Testing

  1. Identify content in the source code
  2. Check that all rendered content is contained by a landmark element

Examples

HTML5

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Sample page</title>
  </head>
  <body>
    <header>
      <h1>Site Name</h1>
    </header>
    <nav>
      <ul>
        <li>Home</li>
        <li><a href="./otherpage/">Other Page</a></li>
      </ul>
    </nav>
    <main>
      <article>Here's an article</article>
    </main>
    <footer>Footer</footer>
  </body>
</html>

HTML4

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta charset="UTF-8">
    <title>Sample page</title>
  </head>
  <body>
    <div role='banner' id='header'>
      <h1>Site Name</h1>
    </div>
    <div role='navigation' id='main-nav'>
      <ul>
        <li>Home</li>
        <li><a href="./otherpage/">Other Page</a></li>
      </ul>
    </div>
    <div role="main">
      <div>Here's an article</div>
    </div>
    <div role='contentinfo'>Footer</div>
  </body>
</html>