ARIA Navigation Menus - Technology Services Accessibility Examples (2024)

Required HTML Markup

A menu toggle must indicate whether its associated menu is expanded or collapsed. This requires the following ARIA attributes:

  • aria-expanded – Set to true if the menu is expanded; false if the menu is collapsed.
  • aria-controls – Set to the HTML id of the menu toggled by this button.
  • aria-haspopup – Set to true. This attribute informs a user that the button is a menu button.
  • aria-hidden – Placed on the controlled menu to hide it from screen readers when collapsed. Set to false when expanded; true when collapsed.

Below is a code snippet showing simplified markup for implementing an accessible menu toggle button. The values of the aria-expanded and the aria-hidden attributes are shown for the collapsed state.

<button aria-expanded="false" aria-haspopup="true" aria-controls="menu-id">Toggle Menu</button> <ul id="menu-id" aria-hidden="true"> . . .</ul> 

Here is the snippet with the menu in the expanded state:

<button aria-expanded="true" aria-haspopup="true" aria-controls="menu-id">Toggle Menu</button> <ul id="menu-id" aria-hidden="false"> . . .</ul> 

JavaScript is needed to toggle the values of the aria-expanded and aria-hidden attributes. Note that the values of aria-controls and aria-haspopup do not change.

Note: The aria-hidden attribute is not needed in modern browsers. Using display: none or visability: hidden is sufficient. The attribute is included here for illustrative purposes.

Interaction Pattern

  • Activating the menu button will toggle the menu open and closed. If the menu is closed, activating the button will open the menu and move focus to the first menu item.
  • Use the up and down arrow keys to move between menu items.
  • Pressing the tab key while in the menu will move focus out of the menu, either to the next focusable element in the page or to the menu button, if shift-tab.
  • Pressing the escape key while focus is in the menu will close the menu and return focus to the menu button.
ARIA Navigation Menus - Technology Services Accessibility Examples (2024)

FAQs

How to make navigation accessible? ›

Basics
  1. Page layouts should be consistent across a site or course.
  2. Make sure menus are accessible and predictable.
  3. Provide descriptive, unique page titles.
  4. Make sure websites have a sitemap.
  5. Use properly nested headings to structure your document.
  6. Write meaningful link text.
  7. Use same-page links for lengthy pages.

How to make an accessible dropdown menu? ›

Accessible drop down menus
  1. Wrap everything in a nav -element.
  2. Structure the menu as a list with one or more nesting levels. ...
  3. Use links to navigate to a page and buttons to control a submenu.
Mar 7, 2023

What is aria in web technology an accessibility standard? ›

Overview. ARIA is a W3C specification that stands for “Accessible Rich Internet Applications.” It consists of markup that can be added to HTML in order to communicate the roles, states, and properties of user interface elements to assistive technologies (AT).

What is the NAV element in accessibility? ›

The nav element is one of several sectioning elements in HTML5. Use of this markup can make groups of links easier to locate and skip past by users of assistive technology such as screen readers.

How to use the accessibility menu? ›

You can set up as many shortcuts as you like for the accessibility apps that you use on your Android device.
  1. On your device, open the Settings app.
  2. Tap Accessibility.
  3. Select the app that you want to use with a shortcut.
  4. Select the shortcut setting, like TalkBack shortcut or Magnification shortcut.
  5. Choose a shortcut:

What makes a website's navigation accessible? ›

Web Accessibility Standards. The WCAG states that there are four main principles you'll need to follow to create an accessible website: That your site is perceivable, operable, understandable, and robust. Within these principles, you can dive deeper into guidelines to reference and apply to your site.

Are drop-down menus accessible? ›

Accessible Drop-Down Menus for Keyboard Users

Users who are reliant on a keyboard must be able to navigate your drop-down menus via the tab key and the enter key. If they can't see the drop-downs when navigating a page, they won't know what links exist and where they lead.

What is Aria haspopup? ›

The aria-haspopup attribute indicates the availability and type of interactive popup element that can be triggered by the element on which the attribute is set.

What is the overflow menu accessibility? ›

Accessibility​

The overflow menu provides additional space for actions when space is at a premium. Screen reader interaction: The overflow menu component is part of the navigation menu and as such includes the role of "menuitem'.

Why aria accessibility? ›

"WAI-ARIA, the Accessible Rich Internet Applications Suite, defines a way to make web content and web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface controls developed with HTML, JavaScript, and related technologies."

What is an example of aria required? ›

Examples. The attribute should be added to the form-control role. If the user needs to fill in an email address textbox , include aria-required="true" on the textbox. Note: If the field's label already contains the word "required", it is recommended to leave out the aria-required attribute.

What is the purpose of aria roles in web accessibility? ›

ARIA plays a vital role in web accessibility by bridging the gap between web content and assistive technologies. By using ARIA roles, properties, and states, web developers can: Provide context and meaning for web elements that are not semantically defined by HTML or have complex or custom functionality.

What is an example of a NAV element? ›

The <nav> HTML element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes.

What is the aria-label for navigation links? ›

The aria-label attribute provides a way to place a descriptive text label on an object, such as a link, when there are no elements visible on the page that describe the object. If descriptive elements are visible on the page, the aria-labelledby attribute should be used instead of aria-label .

Does NAV need role navigation? ›

The role navigation is not needed there because the nav tag itself carries the same semantic meaning. See for example: https://rocketvalidator.com/html-validation/the-navigation-role-is-unnec... This is an accessibility issue for the element.

How do I make Google Maps accessible? ›

Find accessible transit
  1. On your computer, open Google Maps.
  2. In the search bar, enter your destination.
  3. In the list of results, click the location you want.
  4. Click Directions Transit .
  5. Click Options.
  6. Under "Routes," click Wheelchair accessible.
  7. Choose your route.

How do I make Google Maps more accessible? ›

Accessibility in Google Maps
  1. Use a screen reader. You can use Google Maps with your Android's accessibility features, including the TalkBack screen reader. ...
  2. Change text size. You can adjust the size of the labels on the map to see them more clearly. ...
  3. Zoom in the map. ...
  4. Move the map. ...
  5. Find accessible transit.

How do I get the accessibility button on my navigation bar? ›

Step 1: Turn on the Accessibility Menu
  1. On your device, open the Settings app.
  2. Tap Accessibility. Accessibility Menu.
  3. Turn Accessibility Menu shortcut on.
  4. To accept the permissions, tap OK. To change your shortcut, tap Accessibility Menu shortcut. Learn about accessibility shortcuts.

How accessible are GPS? ›

In the 2021 GP patient survey, in answer to the question, “Generally, how easy is it to get through to someone at your GP practice on the phone?”, 68% said 'easy' in 2021, compared with 65% last year.

Top Articles
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 5937

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.