Accessibility Design Guidelines:

Menus and Navigation

page structure image
Source: Photo Jess Bailey on Pexels

Importance and Best Practices

Website navigation should be structured with semantic marked up in order to be accessible to users via key board tabbing and those using screen readers.

In order to meet we accessibility standards, navigation must be structured to include the semantic html element <nav>. This should include an ARIA <role='navigation'> attribute which communicates its meaning to assistive devices. Using an unordered list <ul> conveys structural information to assistive devices about the page region.

Assigning the appropriate ARIA <role=''> to navigational page regions are crucial for screen readers to communicate the meaning of elements to users with disabilities. See Figure A

                    <nav role='navigation >
                          <ul role="menu" aria-label="menubar">
                            <li><a href="" role="menuitem">Home</a></li>
                            <li><a href="" role="menuitem">Services</a></li>
                            <li><a href="" role="menuitem">Products</a></li>
                            <li><a href="" role="menuitem">Contact</a></li>
                          <ul>
                    </nav>
                

Figure A: Include an ARIA attribute to communicates its meaning to assistive devices.

EXAMPLES

Click on the icons below to reveal the corresponding WCAG Success Criteria

Example 1

Horizontal Drop Down Menus

To ensure website accessibility, use a consistent navigational menu on each website page. Users with disabilities benefit with webpage predictibility. Menus should be appear in the same location on each page and items repeating in the same order.
Include the <nav> element with the <aria-label> that matches the name in the <ul>.

Whether by use of assistive technology or mouse, users can focus on components without changing their context. The links in the example below have a black border applied to support the WCAG 3.2.1 Success Criteria. When focus moves onto an element through tab key or mouse the user will know when to initiate the desired action.

                        <nav role="navigation" aria-label="Floral Shop">
                          <ul role="menu" aria-label="Floral Shop">
                          </ul>
                        </nav>
                    
                            nav > ul > li > a:focus{
                              border: 2px solid #000000;
                            }
                        

This is an example of a horizontal navigational menu with accessibility features applied.
Using a CHROME browser, select the 'HOME' link, then use your arrow keys to tab through the menu.

Example 2

Skip Navigation

The “Skip Navigation” means users with assistive devices can avoid tabbing through all menu items just to reach the main content on the webpage, therefore saving them much time and frustration. Often, a website will have a “Skip Navigation’ which is only visible to screen readers as it works solely with assistive devices. This is accomplished using CSS. See Figure A.

"In order to support assistive devices, include a “Skip to main content” link before the header for keyboard users which is visible only when it has focus. This benefits keyboard users who can reach content with fewer keystrokes. Users can easily skip some sections which are not relevant to them."

.sr-only{
                              border: 0;
                              clip: rect(0,0,0,0);
                              height: 1px;
                              margin: -1px;
                              overflow: hidden;
                              padding: 0;
                              width: 1px;
                            }
                    

Figure A: “Skip Navigation’ is only visible to screen readers as it works solely with assistive devices. This is accomplished using CSS.

NOTE: This is only a visual representation.
To test out a working example, reload this webpage in a CHROME browser. Then press the TAB on your keyboard. This will make the "SKIP NAVIGATION" button visible at the top left of the page. Tap ENTER again.

Example 3

Breadcrumb Navigation

A breadcrumb navigation is a secondary navigation that provides a trail of the user's location within a website. One can find their way back to other pages through a hierarchical manner.

"It is also helpful when a user follows a link directly to a page deep within a set of Web pages and needs to navigate that Web site to understand the content of that page or to find more related information." WAI, WCAG

Breadcrumb navigation should be arranged horizontally as text links to be most comprehensive to the user in websites that contain a large amount of pages.

                        <nav role="navigation" aria-label="Breadcrumb">
                          <ul role="menu" aria-label="Breadcrumb">
                          </ul>
                        </nav>
                    

"The WCAG Success Criterion 2.4.8 is helpful for people with a short attention span who may become confused when following a long series of navigation steps to a Web page."

NOTE: The WCAG Success Criterion 2.4.8 Location is not required for AODA compliancy as it is Levell AAA. However, it is recommended as it follows best practices.

The Success Criteria for Menus and Navigation

Who Does This Benefit?

user IconUsing Keyboards for Navigation

vision IconVisual Impairments

computer IconPerson with a Motor Impairment

brain IconCognitive and Learning Disabilities

book IconReading Disabilities

external link icon  Learn More About Navigation

The Related WCAG Success Criteria

1.3.1 Info and Relationships

Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.
(Level A)

1.3.2 Meaningful Sequence

When the sequence in which content is presented affects its meaning, a correct reading sequence can be programmatically determined.
(Level A)

2.1.1 Keyboard

All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints.
(Level A)

2.1.2 No Keyboard Traps

If keyboard focus can be moved to a component of the page using a keyboard interface, then focus can be moved away from that component using only a keyboard interface, and, if it requires more than unmodified arrow or tab keys or other standard exit methods, the user is advised of the method for moving focus away.
(Level A)

3.2.1 On Focus

When any component receives focus, it does not initiate a change of context.
(Level AA)

3.2.3 Consistent Navigation

Navigational mechanisms that are repeated on multiple Web pages within a set of Web pages occur in the same relative order each time they are repeated, unless a change is initiated by the user.
(Level AA)

3.2.4 Consistent Identification

Components that have the same functionality within a set of Web pages are identified consistently.
(Level AA)
Scroll To Top