2.24 Site Navigator - General§

Note

This section has not been updated since it was integrated from APG version 1.0 -- an APG task force review is pending.

Characteristics:
Description:

A collection of links, buttons, or tabs, usually presented in a region on the left or top of a page, that is persistent across most pages of the site. It provides quick access to the primary sections or functions of the site. It may also communicate the structure or hierarchy of the site, allowing the user to quickly drill down to a desired page. It often provides orientation information similar to that of bread crumbs by indicating which page is currently displayed and what its relationship is to the other pages shown in the navigator. Some navigators are overloaded with support for other functions, e.g., reordering pages in a wiki.

Multiple navigators may be present on a page. For example, there may be a top-level navigator presented as tabs across the top and a second level navigator presented as sub tabs either on the top or left.

The site navigator patterns described in this guide are for interactive navigation widgets designed to help standardize solutions to accessibility requirements that have often either been ignored or implemented with other methods that are more limited in their usefulness. For example, most site navigators implemented with static HTML provide a visual indicator of what page is currently displayed but few provide the same information programmatically. Also, the static HTML navigators often provide information about page relationships through their visual layout that is not represented in their HTML structure. Finally, static HTML navigators require the user to tab to every element within the navigator whereas ARIA-enabled navigators implement arrow key navigation within the navigation widget. The navigator then becomes a single tab stop, dramatically reducing the length of the tab sequence and improving usability.

Keyboard Interaction:

See the Site Navigator Tree and Site Navigator Tabbed Style sections for more detail.

WAI-ARIA Roles, States, and Properties:

An ARIA-enabled site navigator is made up of a container widget that enables interaction with the navigation items. The widget is wrapped in a navigation region. The requirements for the navigation widget, items, and region are as follows.

  1. Navigation container widget: the navigation items need to be contained in an appropriate widget, such as a tree, menubar, toolbar, or listbox. See below for additional guidance on implementation using specific widget containers. If the navigator is for a hierarchical site or application, the hierarchy may be represented in one of two ways: by using a tree for the container widget or by using a separate widget for each level of the hierarchy. If a hierarchical site or application uses a tabbed navigation construct, it will need to use one of the patterns that implements a separate widget for each level of the hierarchy. The container widget implementation should address the following considerations and requirements.
    1. Label: The widget should be labelled by using aria-label or aria-labelledby. The label should briefly and adequately describe the scope of navigation. For example, if the navigator scope is the entire site or application, the label could be set to the name of the site or application. Labels should normally be brief, e.g., one to three words. If multiple widgets are used to provide navigation of a hierarchy, the widget label for levels below the root widget should use aria-labelledby to refer to the label of the item in the parent widget that represents the currently active navigation element.
    2. Focus management: When the widget receives focus, the item in the widget that is currently active (e.g., currently displayed) should receive the focus.
    3. aria-controls: aria-controls should be set with a value that refers to the content region that is controlled by the navigator. If multiple navigators are used to provide navigation of a hierarchy, navigation widgets that change the elements of a child navigator should have aria-controls set with a value that refers to the controlled child navigation widget.
    4. aria-multiselectable: If the navigation widget is overloaded with non-navigation functions and if those functions can be performed on multiple elements, then the widget must support aria-multiselectable and have it set to true.
  2. Navigation items: each page or content container represented in the navigator should be represented by an element, such as an option, treeitem, menuitemradio, or button. If the navigator visually communicates which page is currently displayed, the navigation item must be able to programmatically communicate the currently displayed status using aria-selected, aria-checked, or aria-pressed. For this reason, a navigation item may not be a link unless the link is contained inside an option or treeitem. The states and properties of the navigation item should communicate the following.
    1. Name of the target page or function: Every item must have an accessible name.
    2. Current display status: The item representing the page that is currently displayed should have either aria-selected or, if it is a button, aria-pressed set to true. All other items in the widget must have the same state set to false. If the navigation widget is overloaded with non-navigation functions and if it supports multi-selection, then aria-checked should be used instead of aria-selected to indicate the display status.
    3. Operational selection status: If the navigator is overloaded with non-navigation functions, each selected item must have aria-selected set to true and each selectable item must have aria-selected set to false.
  3. Navigation region: Each navigation widget should be wrapped in a container with role navigation and have a label that is the same as the label on the the widget. If multiple widgets are used to support a hierarchy and if the widgets are sequential in the Tab order, then the navigation regions for child widgets should be nested inside the navigation region of the parent.

The following two sections provide detailed descriptions of how to meet the above implementation requirements for site navigators using specific widgets. The Site Navigator Tree section describes how to build a hierarchical navigator using a tree widget that contains links. The Site Navigator Tabbed Style section describes how to implement tabbed style site navigation using a toolbar containing toggle buttons, a menubar containing menuitemradio elements, or a listbox containing links. These are provided as examples and are not necessarily the only implementation options that can meet all the requirements described in this section.

Example:

See the Site Navigator Tree and Site Navigator Tabbed Style sections for examples.

2.25 Site Navigator - Tree§

Note

This section has not been updated since it was integrated from APG version 1.0 -- an APG task force review is pending.

Characteristics:
Description:

A site navigator implemented using a tree widget that provides navigation for a hierarchical set of pages, content containers or application functions. For example, a tree-based navigator is appropriate for the typical left-hand web site navigator that has an outline-like structure where activating a link displays the target of that link in the main content area and displays the pages that are children of the current page in the navigator. Unlike the typical static left-hand navigator, a dynamic tree widget could also provide the ability for the user to explore the hierarchy of the site without having to load a parent page in order to see the titles of the children. This would improve the navigation efficiency for all users by reducing the number of page loads.

Some sites or applications may provide support for hierarchical navigation using tabbed style navigation by providing a tab set for each level of the hierarchy.

Keyboard Interaction:

The tree should implement keyboard navigation consistent with the Tree View design pattern with one exception. When enter is pressed, the default action can be activated on any node containing a link even if it is not an end node. Note that the user can still use left and right arrow to expand and collapse nodes. Note that selection keys should not be implemented unless aria-multiselectable is true. If aria-multi-selectable is false, the default action should be to display the content associated with that item, and if possible, move the focus to the beginning of the controlled region. If aria-multiselectable is true and aria-haspopup is true for the current node, then enter should open a pop-up menu that provides options for navigating to the target specified by the current node and for performing supported non-navigation operations on the currently selected items.

Focus: When the tree receives focus, the item in the tree that is marked as currently displayed should receive focus.

WAI-ARIA Roles, States, and Properties:

To build a site navigator tree, build a tree where each treeitem contains a link. The states and properties of the tree and tree items should be set as follows.

  • aria-label or aria-labelledby: If the navigator has a visual label that briefly and adequately describes the scope of navigation, the element with role tree should have aria-labelledby set with a value that refers to the element containing that label. Otherwise, aria-label should be used to provide an appropriate label. See Site Navigator for more details on appropriate labelling of a navigation widget.
  • aria-controls: The element with role tree should have aria-controls set with a value that refers to the content region controlled by the navigator. Typically, this is the element with role main.
  • aria-multiselectable: aria-multiselectable should be set to false unless the navigator also provides non-navigation functions that require selection. An example of non-navigation function is the ability to re-arrange pages in a wiki.
  • aria-selected: If aria-multiselectable is false, the treeitem containing the link to the page or content that is currently displayed should be indicated by setting aria-selected to true, and all other tree items should have aria-selected set to false. If aria-multiselectable is true, then aria-selected should be used to indicate which items are either selectable or selected for non-navigation functions.
  • aria-checked: if aria-multiselectable is false, aria-checked should not be specified. If aria-multiselectable is true, then aria-checked should be set true on the tree item containing the link to the page or content that is currently displayed, and all other tree items should have aria-checked set to false.
  • aria-haspopup: if aria-multiselectable is false, aria-haspopup should not be specified. If aria-multiselectable is true, one method for exposing non-navigation functions is to provide a pop-up menu containing those functions. If this is done, nodes that support non-navigation functions should have aria-haspopup set to true and the pop-up menu must also provide as its first option the default navigation function. In this way, the user can perform the navigation function simply by pressing enter twice. Or, the user can easily access non-navigation functions by pressing enter and then navigating the pop-up menu.
  • Navigation region: the tree should be wrapped in a container with role navigation, which also has the same label as the tree.
Example:
Editor's Note

Add link to example

2.26 Site Navigator - Tabbed Style§

Note

This section has not been updated since it was integrated from APG version 1.0 -- an APG task force review is pending.

Characteristics:
Description:

A site navigator that provides navigation for a small "sibling" set of pages, content containers or application functions. All the pages in the set are at the same logical level in the site navigation scheme, i.e., there are no parent/child relationships. It will often have a look and feel similar to a tabpanel.

Some sites or applications may provide support for hierarchical navigation using tabbed style navigation by providing a tab set for each level of the hierarchy.

Keyboard Interaction:

Option 1: Listbox containing links

  • The listbox should implement keyboard navigation consistent with the Listbox design pattern. In addition, when Enter is pressed, the default action associated with the the currently focused option will be executed. Note that selection keys should not be implemented unless aria-multiselectable is true. If aria-multi-selectable is false, the default action should be to display the content specified by the link contained in that option, and if possible, move the focus to the beginning of the controlled region. If aria-multiselectable is true and aria-haspopup is true for the currently focused option, then Enter should open a pop-up menu that provides items for navigating to the target specified by the currently focused option and for performing supported non-navigation operations on the currently selected options.
  • Focus: When the listbox receives focus, the option in the listbox that is marked as currently displayed should receive focus.

Option 2: Toolbar containing toggle buttons

  • The toolbar should implement keyboard navigation consistent with the Toolbar design pattern. In addition, when Enter or Space is pressed and the focus is on a button that is not pressed, the content controlled by the currently focussed button should be displayed and aria-pressed should be set to true. The button that was previously pressed should have aria-pressed set to false. If the focus is on a button that was already pressed, the focus should move to the beginning of the controlled region or to the pressed button in a controlled toolbar.
  • Focus: When the toolbar receives focus, the button in the toolbar that is marked as currently displayed should receive focus.

Option 3: Menu bar containing menuitemradio elements

  • The menu bar should implement keyboard navigation consistent with the Menu bar design pattern. In addition, when Enter or Space is checked and the focus is on a menuitemradio element that is not checked, the content controlled by the currently focussed menuitemradio element should be displayed and aria-checked should be set to true. The menuitemradio element that was previously checked should have aria-checked set to false. If the focus is on a menuitemradio element that was already checked, the focus should move to the beginning of the controlled region or to the checked menuitemradio element in a controlled menubar.
  • Focus: When the menubar receives focus, the menuitemradio element in the menubar that is marked as currently displayed should receive focus.
WAI-ARIA Roles, States, and Properties:

Option 1: Listbox containing links

  • To build a tabbed style navigator using a listbox, implement the Listbox design pattern where each option element contains a link. The listbox, options, and links should have the following states, properties, and behaviors.
  • aria-label or aria-labelledby: If the navigator has a visual label that briefly and adequately describes the scope of navigation, the element with role listbox should have aria-labelledby set with a value that refers to the element containing that label. Otherwise, aria-label should be used to provide an appropriate label. See Site Navigator for more details on appropriate labelling of a navigation widget. If multiple navigators are used to support a hierarchy, then a navigator containing elements that are controlled by a parent navigator should have aria-labelledby set to a value that refers to the currently active navigation item in the parent navigator.
  • aria-controls: The element with role listbox should have aria-controls set with a value that refers to the content region controlled by the navigator. Typically, this is the element with role main. If multiple listboxes are used to support a hierarchy, then listboxes that control another listbox should have aria-controls set with a value that refers to the controlled listbox.
  • aria-multiselectable: aria-multiselectable should be set to false unless the navigator also provides non-navigation functions that require selection. An example of non-navigation function is the ability to re-arrange pages in a wiki.
  • aria-selected: If aria-multiselectable is false, the option containing the link to the page or content that is currently displayed should be indicated by setting aria-selected to true, and all other options should have aria-selected set to false. If aria-multiselectable is true, then aria-selected should be used to indicate which options are either selectable or selected for non-navigation functions.
  • aria-checked: if aria-multiselectable is false, aria-checked should not be specified. If aria-multiselectable is true, then aria-checked should be set to true on the option containing the link to the page or content that is currently displayed, and all other options should have aria-checked set to false.
  • aria-haspopup: if aria-multiselectable is false, aria-haspopup should not be specified. If aria-multiselectable is true, one method for exposing non-navigation functions is to provide a pop-up menu containing those functions. If this is done, options that support non-navigation functions should have aria-haspopup set to true and the pop-up menu must also provide as its first item the default navigation function. In this way, the user can perform the navigation function simply by pressing enter twice. Or, the user can easily access non-navigation functions by pressing enter and then navigating the pop-up menu.
  • Navigation region: the listbox should be wrapped in a container with role navigation, which also has the same label as the listbox.

Option 2: Toolbar containing toggle buttons

  • To build a tabbed style navigator using a toolbar, implement the Toolbar design pattern with one button in the toolbar for each navigation item. Note that this pattern can not be overloaded with non-navigation functions. The toolbar and buttons should have the following states, properties, and behaviors.
  • aria-label or aria-labelledby: If the navigator has a visual label that briefly and adequately describes the scope of navigation, the element with role toolbar should have aria-labelledby set with a value that refers to the element containing that label. Otherwise, aria-label should be used to provide an appropriate label. See Site Navigator for more details on appropriate labelling of a navigation widget. If multiple navigators are used to support a hierarchy, then a navigator containing elements that are controlled by a parent navigator should have aria-labelledby set to a value that refers to the currently active navigation item in the parent navigator.
  • aria-controls: The element with role toolbar should have aria-controls set with a value that refers to the content region controlled by the navigator. Typically, this is the element with role main. If multiple toolbars are used to support a hierarchy, then toolbars that control another toolbar should have aria-controls set with a value that refers to the controlled toolbar.
  • aria-pressed: The button for the page or content that is currently displayed should be indicated by setting aria-pressed true and all other buttons in the toolbar should have aria-pressed set to false.
  • Navigation region: the toolbar should be wrapped in a container with role navigation, which also has the same label as the toolbar.

Option 3: Menu bar containing menuitemradio elements

  • To build a tabbed style navigator using a menubar, implement the Menu bar design pattern with a group containing one menuitemradio element in the menubar for each navigation item. Note that this pattern can not be overloaded with non-navigation functions. The menubar and menuitemradio elements should have the following states, properties, and behaviors.
  • aria-label or aria-labelledby: If the navigator has a visual label that briefly and adequately describes the scope of navigation, the element with role menubar should have aria-labelledby set with a value that refers to the element containing that label. Otherwise, aria-label should be used to provide an appropriate label. See Site Navigator for more details on appropriate labelling of a navigation widget. If multiple navigators are used to support a hierarchy, then a navigator containing elements that are controlled by a parent navigator should have aria-labelledby set to a value that refers to the currently active navigation item in the parent navigator.
  • aria-controls: The element with role menubar should have aria-controls set with a value that refers to the content region controlled by the navigator. Typically, this is the element with role main. If multiple menubars are used to support a hierarchy, then menubars that control another menubar should have aria-controls set with a value that refers to the controlled menubar.
  • aria-checked: The menuitemradio element for the page or content that is currently displayed should be indicated by setting aria-checked true and all other menuitemradio elements in the menubar should have aria-checked set to false.
  • Navigation region: the menubar should be wrapped in a container with role navigation, which also has the same label as the menubar.
Example:
Editor's Note

Add link to example