Navigation: Menu and Navigation Bars
Evaluation Rules
The Accessibility Extension does not provide automated evaluation of the rules 1, 2, 4 and 5.
| no. | FAE 2007 | FAE 2008 | FAE for ARIA | Description |
|---|---|---|---|---|
| 1 | N/A | Pass/Fail | Pass/Fail | Each container element that appears to be a navigation bar or menu should be immediately preceded by a h2 or other heading element. Container elements that are considered navigation bars:
|
| 2 | Pass/Fail | Pass/Warning | Pass/Fail | Each area element must have a redundant text link (a element) with matching href values corresponding to the href values of the area elements. |
| 3 | N/A | Pass/Check | Pass/Check | Most web pages should contain at least one navigation bar. |
| 4 | N/A | N/A | Pass/Fail | Each container elements identified as navigation bar needs to include the role attribute with a value of "navigation". |
| 5 | N/A | N/A | Pass/Fail | Each container elements with
|
| 5 | Pass/Fail | N/A | N/A | Each ul and ol element that contain li elements that are mostly links must be immediately preceeded by a heading element. |
Identification of List Elements as Navigation Bars
The Extension identifies navigation bars in three ways:
- HTML Best Practices
olandulelements are identified as navigation bars if anaelement appears in each of at least 80% of theli's, either directly as the content or somewhere within another list element that is nested inside theli.
- XHTML
roleattribute- The element has the
roleattribute set tomenubarornavigation.
- The element has the
- XHTML
linkelementrelattribute- A
linkelement withrelattribute set to'navigation'hashrefattribute that refers to theidattribute of a navigation bar element.
- A
Dialog Box
Menu and Navigation Bars List (top list)
- This list itemizes all elements identified as navigation bars.
- Selecting an item in the list, by clicking on the item or by using the arrow keys, highlights the corresponding navigation bar in the browser, and populates the Details List.
- Selecting an item with yellow background, by clicking on the item or by using the arrow keys, displays warning statement in the Accessibility Information area.
- Columns
- Order (hidden) - the sequence in which the items appear on the page is displayed.
- Role - BP (Best Practices) indicates a list element identified as a navigation bar via the use of HTML Best Practices. Menubar/Navigation indicates a list element identified via
roleattribute. Lastly, therelattribute of a link element, identified as a navigation bar bylinkelement, is displayed.
Note: If an item satisfies more than one set of identifying conditions, it is displayed multiple times, once for each case of identification. - Navigation Bar Title - The Extension follows the hierarchy listed below to look for content to display as the title for each identified navigation bar. The Accessibility Extension moves down the hierarchy until it finds the non-empty content.
- If a navigation bar is identified for the use of HTML Best Practices,
- the heading that immediately precedes the element;
- or the message (Missing Title) is displayed. Selecting the item, by clicking on the item or by using the arrow keys, displays warning statement in the Accessibility Information area.
- If a navigation bar is identified by the
roleattribute,- the preceding heading that has the same
idattribute as thearia-labelledbyattribute of the element; - the
titleattribute of the element; - or the message (No Labelledby or Title) is displayed.
- the preceding heading that has the same
- If a navigation bar is identified by
relattribute of alinkelement,- the
titleattribute of thelinkelement is displayed; - or the entry is left blank.
- the
- If a navigation bar is identified for the use of HTML Best Practices,
Details List (center list)
- This list is populated when an item in the top list is selected.
- Detailed information pertaining to the item selected in the top list is displayed.
- Selecting an item in this list, by clicking on the item or by using the arrow keys, highlights the corresponding link content in the broswer; and activates the Go To URL button.
- Columns
- Link Text - The Accessibility Extension follows the hierarchy listed below to look for content to display as the Link Text for each link of the selected navigation bar. The Accessibility Extension moves down the hierarchy until it finds the non-empty content.
- the
titleattribute of thelielement - the
altattribute ofimgelement if the content is an image - or the text content of the
lielement is displayed.
- the
- HREF - The
hrefattribute of eachaelement is displayed. - Number (hidden) - The sequence in which the items appear on the page is displayed.
- Link Text - The Accessibility Extension follows the hierarchy listed below to look for content to display as the Link Text for each link of the selected navigation bar. The Accessibility Extension moves down the hierarchy until it finds the non-empty content.
Accessibility Information
- Warn: Each ol or ul element that appears to be a navigation bar or menu should be immediately preceded by a header element (h2..h6 -or- role=heading).
Buttons
- View Summary - opens a new browser window and displays the contents of the dialog box in the new browser window, allowing the user to see/print the entire data set.
- Go To URL - closes the dialog box and follows (opens) the selected link in a new window or tab as per the user's browser preferences. This button is activated when an item in the center list is selected.
- Close Window - closes the dialog box.
HTML Markup Details
ulelement and other container elements- The
ulelement is the preferred container for navigation links. - Other containers elements identified as navigation bars include the nested
tableelements that contain mostly links andmapelements that containareaelements. Although these containers are not as accessible or interoperable as theulelement. lianda- Use
lias a container for individual links in the navigation bar - Headings
h2-h6 - Heading elements (
h2-h6) are used to provide descriptive labels for a collection of links for page and site navigation, theh2element is preferred for most navigation bars. - The heading needs to immediately proceed the navigation bar container element.
- Heading elements can be hidden in a graphical rendering using CSS absolute positioning, for example:
<h2 style="position: absolute; left: -200em; top:-20em;">menu title</code>
