Skip to content

Commit

Permalink
WCAG 2.2 migration (#2147)
Browse files Browse the repository at this point in the history
* Update links in rules to go to 2.2

* Update glossary links to use WCAG 2.2

* Add WCAG 2.2 to tests

* Update design docs to link to WCAG 2.2

* Replace uses of "WCAG 2.0|1" where needed with "WCAG 2.2"

* Various aria corrections

* Update _rules/role-attribute-valid-value-674b10.md

Co-authored-by: Jean-Yves Moyen <[email protected]>

* Update _rules/document-has-landmark-with-non-repeated-content-b40fd1.md

Co-authored-by: Jean-Yves Moyen <[email protected]>

* Fix failing test

---------

Co-authored-by: Jean-Yves Moyen <[email protected]>
  • Loading branch information
WilcoFiers and Jym77 authored Jan 25, 2024
1 parent c4a040d commit 346ae67
Show file tree
Hide file tree
Showing 116 changed files with 495 additions and 489 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For more information, see [ACT Overview - What is ACT](https://www.w3.org/WAI/GL

## Write rules, not tools

An ACT rule is a unambiguous description of what the results of accessibility test tools and methodologies be when running a conformance test for the [Web Content Accessibility Guidelines][wcag21]. The rules are written without a specific implementation in mind. The goal is not to create an accessibility test tool. Instead we aim to harmonize between existing tools, and improve their transparency and the overall quality of their results.
An ACT rule is a unambiguous description of what the results of accessibility test tools and methodologies be when running a conformance test for the [Web Content Accessibility Guidelines][wcag22]. The rules are written without a specific implementation in mind. The goal is not to create an accessibility test tool. Instead we aim to harmonize between existing tools, and improve their transparency and the overall quality of their results.

If you want to know more about us, visit our website at: [www.w3.org/community/act-r][act-r].

Expand All @@ -34,5 +34,5 @@ For info on how to use this GitHub repository, see the [ACT-Rules GitHub Guideli

This repository automatically pushes changes to rules to the [w3c/wcag-act-rules](https://github.com/w3c/wcag-act-rules/) repository. There is an "Approve rule" action available which can be triggered manually by an ACT Task Force facilitator, which will set a proposed rule to "approved".

[wcag21]: https://www.w3.org/TR/WCAG21/
[wcag22]: https://www.w3.org/TR/WCAG22/
[act-r]: https://www.w3.org/community/act-r/
12 changes: 8 additions & 4 deletions __tests__/link-is-outdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ const uniqueArray = require('../utils/unique-array')
* Map of bad links vs their recommendations
*/
const badLinksAndRecommendations = {
'://www.w3.org/TR/WCAG20/': 'Use WCAG 2.1 reference- https://www.w3.org/WAI/WCAG21/',
'://www.w3.org/TR/UNDERSTANDING-WCAG20/': 'Use WCAG 2.1 reference - https://www.w3.org/WAI/WCAG21/Understanding/',
'://www.w3.org/TR/WCAG20-TECHS/': 'Use WCAG 2.1 reference - https://www.w3.org/WAI/WCAG21/Techniques/',
'://www.w3.org/TR/wai-aria-1.0/': 'Use ARIA 1.1 reference - https://www.w3.org/TR/wai-aria-1.1/',
'://www.w3.org/TR/WCAG20/': 'Use WCAG 2.2 reference- https://www.w3.org/WAI/WCAG22/',
'://www.w3.org/TR/WCAG21/': 'Use WCAG 2.2 reference- https://www.w3.org/WAI/WCAG22/',
'://www.w3.org/TR/UNDERSTANDING-WCAG20/': 'Use WCAG 2.2 reference - https://www.w3.org/WAI/WCAG22/Understanding/',
'://www.w3.org/WAI/WCAG21/Understanding/': 'Use WCAG 2.2 reference- ://www.w3.org/WAI/WCAG22/Understanding/',
'://www.w3.org/TR/WCAG20-TECHS/': 'Use WCAG 2.2 reference - https://www.w3.org/WAI/WCAG22/Techniques/',
'://www.w3.org/WAI/WCAG21/Techniques/': 'Use WCAG 2.2 reference - https://www.w3.org/WAI/WCAG22/Techniques/',
'://www.w3.org/TR/wai-aria-1.0/': 'Use ARIA 1.2 reference - https://www.w3.org/TR/wai-aria-1.2/',
'://www.w3.org/TR/wai-aria-1.1/': 'Use ARIA 1.2 reference - https://www.w3.org/TR/wai-aria-1.2/',
'://www.w3.org/TR/dom41/': 'Use http://dom.spec.whatwg.org',
'://www.w3.org/TR/html/': 'Use http://html.spec.whatwg.org',
'://www.w3.org/TR/html52/': 'Use http://html.spec.whatwg.org',
Expand Down
2 changes: 2 additions & 0 deletions __tests__/spelling-ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- WCAG
- WCAG2
- WCAG21
- WCAG22
- CSS3
- css # lowercase needed in reference list
- UA
Expand Down Expand Up @@ -120,6 +121,7 @@
- multipage
- attr-input-type
- wai-aria-1.1
- wai-aria-1.2

# Notes and acronyms
- TODO
Expand Down
6 changes: 3 additions & 3 deletions _rules/aria-attr-defined-5f99a7.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ The presence of unknown ARIA attributes is often the result of a typo or other d

- [ARIA in HTML](https://www.w3.org/TR/html-aria/#index-aria-global)
- [WAI ARIA Supported States and Properties](https://www.w3.org/TR/wai-aria-1.2/#supportedState)
- [G108: Using markup features to expose the name and role](https://www.w3.org/WAI/WCAG21/Techniques/general/G108)
- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
- [G108: Using markup features to expose the name and role](https://www.w3.org/WAI/WCAG22/Techniques/general/G108)
- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value)
- [Semantics and ARIA](https://developers.google.com/web/fundamentals/accessibility/semantics-aria/)

## Test Cases
Expand Down
10 changes: 5 additions & 5 deletions _rules/aria-hidden-no-focusable-content-6cfa84.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Some user agents treat the value of `aria-hidden` attribute as case-sensitive.

## Background

Using `aria-hidden="false"` on a descendant of an element with `aria-hidden="true"` [**does not** expose that element](https://www.w3.org/TR/wai-aria-1.1/#aria-hidden). `aria-hidden="true"` hides itself and all its content from assistive technologies.
Using `aria-hidden="false"` on a descendant of an element with `aria-hidden="true"` [**does not** expose that element](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden). `aria-hidden="true"` hides itself and all its content from assistive technologies.

By adding `aria-hidden="true"` to an element, content authors ensure that assistive technologies will ignore the element. This can be used to hide parts of a web page that are [pure decoration](https://www.w3.org/TR/WCAG21/#dfn-pure-decoration), such as icon fonts - that are not meant to be read by assistive technologies.
By adding `aria-hidden="true"` to an element, content authors ensure that assistive technologies will ignore the element. This can be used to hide parts of a web page that are [pure decoration](https://www.w3.org/TR/WCAG22/#dfn-pure-decoration), such as icon fonts - that are not meant to be read by assistive technologies.

An element with an `aria-hidden` attribute set to `true` that is also part of the [sequential focus navigation][] may cause confusion for users of assistive technologies because the element can be reached via [sequential focus navigation][], but it should be hidden and not [included in the accessibility tree][].

Expand All @@ -59,9 +59,9 @@ The 1 second time span introduced in the exception of the definition of [focusab
### Bibliography

- [CSS Scoping Module Level 1 (editor's draft)](https://drafts.csswg.org/css-scoping/)
- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
- [`aria-hidden` (state)](https://www.w3.org/TR/wai-aria-1.1/#aria-hidden)
- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value)
- [`aria-hidden` (state)](https://www.w3.org/TR/wai-aria-1.2/#aria-hidden)
- [Fourth rule of ARIA use](https://www.w3.org/TR/using-aria/#fourth)
- [Element with presentational children has no focusable content](presentational-children-no-focusable-content-307n5z.md)

Expand Down
6 changes: 3 additions & 3 deletions _rules/aria-required-context-role-ff89c9.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Some user agents try to correct missing [required context roles][] or incorrect

### Bibliography

- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html)
- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html)
- [Required Context Role][]

## Test Cases
Expand Down Expand Up @@ -251,8 +251,8 @@ There is no element with an [explicit role][] different from its [implicit role]
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of Included in the Accessibility Tree'
[required context role]: https://www.w3.org/TR/wai-aria-1.2/#scope 'WAI ARIA definition of Required Context Role'
[required context roles]: https://www.w3.org/TR/wai-aria-1.2/#scope 'WAI ARIA definition of Required Context Role'
[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships 'Success Criterion 1.3.1 Info and Relationships'
[sc411]: https://www.w3.org/TR/WCAG21/#parsing 'Success Criterion 4.1.1 Parsing'
[sc131]: https://www.w3.org/TR/WCAG22/#info-and-relationships 'Success Criterion 1.3.1 Info and Relationships'
[sc411]: https://www.w3.org/TR/WCAG22/#parsing 'Success Criterion 4.1.1 Parsing'
[semantic role]: #semantic-role 'Definition of Semantic Role'
[subclass role]: https://www.w3.org/TR/wai-aria-1.2/#subclassroles 'ARIA Specification of Subclass Role'
[ul]: https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element 'HTML specification of the ul element'
Expand Down
2 changes: 1 addition & 1 deletion _rules/aria-required-id-references-in6db8.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This rule is written specifically for `aria-controls`, because it is the only [I

### Bibliography

- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA5)
- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA5)
- [WAI-ARIA required states and properties](https://www.w3.org/TR/wai-aria-1.2/#requiredState)
- [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt)

Expand Down
4 changes: 2 additions & 2 deletions _rules/aria-required-owned-element-bc4a75.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Each test target only [owns][] elements with a [semantic role][] from the [requi

## Assumptions

If the [explicit semantic role][] on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule may not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under [WCAG success criterion 1.3.1 Info and Relationships](https://www.w3.org/TR/WCAG21/#info-and-relationships).
If the [explicit semantic role][] on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule may not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under [WCAG success criterion 1.3.1 Info and Relationships](https://www.w3.org/TR/WCAG22/#info-and-relationships).

## Accessibility Support

Expand All @@ -55,7 +55,7 @@ The applicability of this rule is limited to the [WAI-ARIA 1.2 Recommendation][w

### Bibliography

- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html)
- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html)
- [Required Owned Element](https://www.w3.org/TR/wai-aria-1.2/#mustContain)
- [Owned Element](https://www.w3.org/TR/wai-aria-1.2/#dfn-owned-element)

Expand Down
6 changes: 3 additions & 3 deletions _rules/aria-state-or-property-permitted-5c01ea.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ Assessing the value of the attribute is out of scope for this rule.

### Bibliography

- [Understanding Success Criterion 4.1.1: Parsing](https://www.w3.org/WAI/WCAG21/Understanding/parsing.html)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html)
- [Understanding Success Criterion 4.1.1: Parsing](https://www.w3.org/WAI/WCAG22/Understanding/parsing.html)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html)
- [WAI-ARIA 1.2, Supported States and Properties](https://www.w3.org/TR/wai-aria-1.2/#states_and_properties)
- [WAI-ARIA 1.2, Global States and Properties](https://www.w3.org/TR/wai-aria-1.2/#global_states)
- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA5)
- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA5)
- [Document conformance requirements for use of ARIA attributes in HTML](https://www.w3.org/TR/html-aria/#docconformance)

## Test Cases
Expand Down
4 changes: 2 additions & 2 deletions _rules/aria-state-or-property-valid-value-6a7281.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ This rule does not require the target of an `ID Reference` to exist. This is bec

### Bibliography

- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html)
- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA5)
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html)
- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA5)
- [WAI-ARIA 1.2, Definitions of States and Properties](https://www.w3.org/TR/wai-aria-1.2/#state_prop_def)
- [WAI-ARIA 1.2, Characteristics of States and Properties, Value](https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value)
- [Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)](https://www.ietf.org/rfc/rfc3986.txt)
Expand Down
2 changes: 1 addition & 1 deletion _rules/attr-not-duplicated-e6952f.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ There are no accessibility support issues known.

### Bibliography

- [H94: Ensuring that elements do not contain duplicate attributes](https://www.w3.org/WAI/WCAG21/Techniques/html/H94)
- [H94: Ensuring that elements do not contain duplicate attributes](https://www.w3.org/WAI/WCAG22/Techniques/html/H94)

## Test Cases

Expand Down
2 changes: 1 addition & 1 deletion _rules/audio-as-media-alternative-afb423.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ There are no accessibility support issues known.

### Bibliography

- [Understanding SC 1.2.1:Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG21/Understanding/audio-only-and-video-only-prerecorded)
- [Understanding SC 1.2.1: Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/audio-only-and-video-only-prerecorded)

## Test Cases

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ For each test target, the [outcome](#outcome) of at least one of the following r
## Assumptions

- This rule assumes that it is not possible to satisfy [Success Criterion 1.4.2 Audio Control][sc142] if the total length of the automatically playing audio is more than 3 seconds, even if there are pauses in the sound and no more than 3 seconds in a row with actual sound.
- This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to control the sound must be located in the same [web page][]. Mechanisms located on other pages can still create accessibility issues for users relying on sound to navigate (e.g. screen readers users) since the autoplaying sound will interfere with their ability to find and activate the mechanism. If a [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) external to the [web page][] is provided, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142].
- This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG21/#dfn-mechanism) to control the sound must be visible and accessible in order to be effective and usable by all kinds of users. If the mechanism is hidden to some users, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142].
- This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG22/#dfn-mechanism) to control the sound must be located in the same [web page][]. Mechanisms located on other pages can still create accessibility issues for users relying on sound to navigate (e.g. screen readers users) since the autoplaying sound will interfere with their ability to find and activate the mechanism. If a [mechanism](https://www.w3.org/TR/WCAG22/#dfn-mechanism) external to the [web page][] is provided, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142].
- This rule assumes that the [mechanism](https://www.w3.org/TR/WCAG22/#dfn-mechanism) to control the sound must be visible and accessible in order to be effective and usable by all kinds of users. If the mechanism is hidden to some users, it is possible to fail this rule but still satisfy [Success Criterion 1.4.2 Audio Control][sc142].

## Accessibility Support

Expand All @@ -81,7 +81,7 @@ The [instruments][instrument] used to pass this rule (if any), must meet all lev

### Bibliography

- [Understanding Success Criterion 1.4.2: Audio Control](https://www.w3.org/WAI/WCAG21/Understanding/audio-control.html)
- [Understanding Success Criterion 1.4.2: Audio Control](https://www.w3.org/WAI/WCAG22/Understanding/audio-control.html)
- [Accessible Multimedia](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Multimedia)

## Test Cases
Expand Down Expand Up @@ -198,5 +198,5 @@ This `audio` element does not play automatically.
[attribute value]: #attribute-value 'Definition of Attribute Value'
[instrument]: #instrument-to-achieve-an-objective 'Definition of Instrument to Achieve an Objective'
[media resource]: https://html.spec.whatwg.org/multipage/media.html#media-resource 'HTML Specification of Media Resource'
[sc142]: https://www.w3.org/TR/WCAG21/#audio-control 'Success Criterion 1.4.2 Audio Control'
[sc142]: https://www.w3.org/TR/WCAG22/#audio-control 'Success Criterion 1.4.2 Audio Control'
[web page]: #web-page-html 'Definition of HTML web page'
4 changes: 2 additions & 2 deletions _rules/audio-text-alternative-e7aa44.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ There are no accessibility support issues known.

### Bibliography

- [Understanding SC 1.2.1:Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG21/Understanding/audio-only-and-video-only-prerecorded)
- [G158: Providing an alternative for time-based media for audio-only content](https://www.w3.org/WAI/WCAG21/Techniques/general/G158)
- [Understanding SC 1.2.1: Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/audio-only-and-video-only-prerecorded)
- [G158: Providing an alternative for time-based media for audio-only content](https://www.w3.org/WAI/WCAG22/Techniques/general/G158)

## Test Cases

Expand Down
6 changes: 3 additions & 3 deletions _rules/audio-transcript-2eb176.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This rule applies to every [non-streaming](#non-streaming-media-element) `audio`

The auditory information of each test target is available through a text transcript. That text transcript is [visible][] and [included in the accessibility tree][], either on the page or through a link.

**Note:** A "text transcript" in the context of this rule is defined in WCAG 2 as an [alternative for time based media](https://www.w3.org/TR/WCAG21/#dfn-alternative-for-time-based-media).
**Note:** A "text transcript" in the context of this rule is defined in WCAG 2 as an [alternative for time based media](https://www.w3.org/TR/WCAG22/#dfn-alternative-for-time-based-media).

## Assumptions

Expand All @@ -45,8 +45,8 @@ There are no accessibility support issues known.

### Bibliography

- [Understanding SC 1.2.1:Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG21/Understanding/audio-only-and-video-only-prerecorded)
- [G158: Providing an alternative for time-based media for audio-only content](https://www.w3.org/WAI/WCAG21/Techniques/general/G158)
- [Understanding SC 1.2.1:Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/audio-only-and-video-only-prerecorded)
- [G158: Providing an alternative for time-based media for audio-only content](https://www.w3.org/WAI/WCAG22/Techniques/general/G158)

## Test Cases

Expand Down
Loading

0 comments on commit 346ae67

Please sign in to comment.