We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

container-missing-semantics

Web validation

Groups of interactive elements that function as navigation must be identified as navigation.

A group of links or buttons that lets people move around the site or the page, like a main menu, a list of section links, or a set of footer links, is a navigation area. Sighted users recognize it from its layout. Screen reader users rely on the navigation landmark instead: screen readers can list a page's landmarks and jump straight to each one, and they announce where a navigation area starts and ends.

When the group is built from generic elements, such as a <div> full of links, it has no navigation semantics. Screen reader users can't reach it with landmark navigation, and they may not understand that its items belong together.

Evinced reports this issue when a container holds two or more interactive elements and appears to be a navigation group, but it isn't inside a navigation landmark, doesn't have a navigation role, and doesn't match another pattern that Evinced can test, such as an accordion or a tablist.

To fix the issue:

  • If the group is site or page navigation, wrap it in a <nav> element, or an element with role="navigation". If the page has more than one navigation area, give each one a unique accessible name with aria-label or aria-labelledby.
  • If the group is a different component, such as a tablist, a menu, or an accordion, apply that pattern's roles and attributes instead.

Pass Patterns

The <nav> element exposes the group as a navigation landmark.

HTML
<nav aria-label="Main">
    <ul>
        <li><a href="/">Home</a></li>
        <li><a href="/products">Products</a></li>
        <li><a href="/about">About</a></li>
    </ul>
</nav>

Two navigation areas, each with a unique name

Each <nav> element has its own accessible name, so screen reader users can tell the navigation areas apart in the landmarks list.

HTML
<nav aria-label="Main">
    <!-- Main menu links -->
</nav>


<nav aria-label="Footer">
    <!-- Footer links -->
</nav>

Fail Patterns

The group looks and works like a main menu, but the <div> gives it no navigation semantics, so it doesn't appear as a landmark.

HTML
<div class="main-menu">
    <a href="/">Home</a>
    <a href="/products">Products</a>
    <a href="/about">About</a>
</div>

WCAG techniques

Sufficient techniques

Try It Yourself

Using a screen reader

New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers

  1. Load the page and open a screen reader.
  2. Open the screen reader's list of landmarks, for example the VoiceOver rotor or the NVDA Elements List.
  3. Look for the navigation group in the list.

Expected results: The group is listed as a navigation landmark. When the page has more than one, each has a unique name, for example "Main navigation" and "Footer navigation".

Actual results: The group isn't listed as a landmark, so it can't be reached from the landmarks list.

Inspecting the browser dev-tools

  1. In your browser's dev tools, select the element that contains the group and open the Accessibility panel.
  2. Check the role of the container and its ancestors.

Expected results: The container, or one of its ancestors, has the navigation role.

Actual results: The container and its ancestors have generic roles only.

FAQ

How does this issue relate to 1.3.1 Info and relationships?

SC 1.3.1 requires information and relationships that are conveyed visually to be available programmatically. The layout shows that the items form one navigation area. Without navigation semantics, that relationship exists only visually, so screen reader users don't get it.

Why is this issue marked as Serious?

Screen reader users often move between the main areas of a page using landmarks. When a navigation area isn't exposed, they can't jump to it, and they have to move through the page item by item to find it and to work out that its links belong together. This slows them down considerably, so the issue is rated serious.

Does every group of links need a nav element?

No. Use <nav> for the major navigation areas of a page, such as the main menu, a table of contents, or breadcrumbs. Links inside a paragraph, or a short list of related links, don't need it. If a group isn't navigation at all, for example a set of tabs or an accordion, give it the semantics of the component it actually is.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.21.3.1 Info and Relationships (A)Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.
EN 301 5499.1.3.1 Info and RelationshipsSame as the WCAG text.

Personas impacted by this issue

Learn More