Skip to content

consistent-navigation-ACT-Rule-proposal #2050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions __tests__/spelling-ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Tag(s)
- svg # `aria-query` dom tags does not list `svg`
- xhtml
- XHTML
- DOCTYPE
- iFrame # used to demonstrate bad spelling
- Iframe
Expand Down
143 changes: 143 additions & 0 deletions _rules/consistent-navigation-oe3rrh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
id: oe3rrh
name: Consistent navigation
rule_type: atomic
description: |
This rule checks whether 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.

accessibility_requirements:
wcag2.1:3.2.3: # Consistent Navigation (AA)
forConformance: true
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- CSS Styling
- DOM tree
acknowledgments:
authors:
- Chris Loiselle
- Helen Burge
---

## Applicability

This rule applies to any two pages within a given [set of pages][].

## Expectation

For each target, [navigational mechanisms][] that are present on both pages appear in the same relative order.

## Background

### Assumptions

"Same relative order" means that secondary navigation items may change the original location of the elements. They can be present without affecting the outcome of this test.

### Accessibility Support

There are no accessibility support issues known.

### Bibliography

- [Understanding Success Criterion 3.2.3: Consistent Navigation](https://www.w3.org/WAI/WCAG22/Understanding/consistent-navigation.html)

## Test Cases

Procedure
Check to see if a navigation mechanism is being used on more than one Web page.
Check the default presentation of the navigation mechanism on each page to see if the list of links are in the same relative order on each Web page.
"Same relative order" means that secondary navigation items may be in between the link items on some pages. They can be present without affecting the outcome of this test.

Expected Results
If #1 is true and #2 is false, then this failure condition applies and content fails the Success Criterion.

### Passed


A search field is the last item on every Web page in a site. Users can quickly locate the search function.

An expanding navigation menu

A navigation menu includes a list of seven items with links to the main sections of a site. When a user selects one of these items, a list of sub-navigation items is inserted into the top-level navigation menu.

Consistently positioned skip navigation controls

A "skip navigation" (or "skip to main content") link is included as the first link on every page in a Web site. The link allows users to quickly bypass heading information and navigational content and begin interacting with the main content of a page.

Skip to navigation link

Navigational content is consistently located at the end of each page in a set of Web pages. A "skip to navigation" link is consistently located at the beginning of each page so that keyboard users can easily locate it when needed.

#### Passed Example 1

A consistently located control. Presenting repeated components in the same relative order each time they appear.


Examples of a navigation mechanism that presents links in same order.

Page 1 Menu

<div id="menu">
<a href="Brazil.htm">Brazil</a><br />
<a href="Canada.htm">Canada</a><br />
<a href="Germany.htm">Germany</a><br />
<a href="Poland.htm">Poland</a>
</div>
Page 2 Menu

<div id="menu">
<a href="Brazil.htm">Brazil</a><br />
<a href="Canada.htm">Canada</a><br />
<a href="Germany.htm">Germany</a><br />
<a href="Poland.htm">Poland</a>
</div>

#### Passed Example 2

...

### Failed

#### Failed Example 1

##### Description

This describes a failure condition for all techniques involving navigation mechanisms that are repeated on multiple Web pages within a set of Web pages (Success Criterion 3.2.3). If the mechanism presents the order of links in a different order on two or more pages, then the failure is triggered.

Example 1: An XHTML menu presenting a series of links that are in a different relative order on two different pages
Examples of a navigation mechanism that presents links in a different order.

Page 1 Menu

<div id="menu">
<a href="Brazil.htm">Brazil</a><br />
<a href="Canada.htm">Canada</a><br />
<a href="Germany.htm">Germany</a><br />
<a href="Poland.htm">Poland</a>
</div>
Page 2 Menu

<div id="menu">
<a href="Canada.htm">Canada</a><br />
<a href="Brazil.htm">Brazil</a><br />
<a href="Germany.htm">Germany</a><br />
<a href="Poland.htm">Poland</a>
</div>

```html
<!-- code -->
```

### Inapplicable

#### Inapplicable Example 1

Description...

```html
<!-- code -->
```

[set of pages]: #set-of-pages 'Definition of set of pages'
[navigational mechanisms]: #navigational-mechanisms 'Definition of a navigational mechanism'
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
{
"name": "Wilco Fiers",
"url": "https://github.com/wilcofiers"
},
{
"name": "Chris Loiselle",
"url": "https://github.com/ChrisLoiselle"
}
],
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions pages/glossary/navigational-mechanisms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Navigational Mechanisms
key: navigational-mechanisms
unambiguous: true
objective: true
---

A method for how a user can move through a series of documents, or [navigation across documments](https://html.spec.whatwg.org/#navigating-across-documents).
10 changes: 10 additions & 0 deletions pages/glossary/set-of-pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Set of pages
key: set-of-pages
unambiguous: true
objective: false
---

A _set of pages_ is a set of [web pages][] that are in a defined group or brand (also known as [top-level browsing context](https://html.spec.whatwg.org/#top-level-browsing-context)) to require consistent [elements in the DOM](https://html.spec.whatwg.org/#elements-in-the-dom).

[web pages]: #web-page-html 'Definition of web page'