Skip to content
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

Move secondary requirement texts out of the background #2060

Merged
merged 16 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
3 changes: 2 additions & 1 deletion __tests__/frontmatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ function validateRuleFrontmatter({ frontmatter }, metaData) {
const accRequirementValues = Object.values(accessibility_requirements)
test.each(accRequirementValues)('has expected keys for accessibility requirement: `%p`', accReq => {
if (accReq.secondary) {
expect(accReq.secondary).toBeTrue()
// Note; empty strings & false won't get here, and so aren't allowed
expect(['string', 'boolean']).toContain(typeof accReq.secondary)
return
}

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 @@ -6,9 +6,9 @@ description: |
This rule checks that each `aria-` attribute specified is defined in ARIA 1.2.
accessibility_requirements:
wcag20:1.3.1: # Info and Relationships (A)
secondary: true
secondary: Because this rule does not ignore irrelevant ARIA properties, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
wcag20:4.1.2: # Name, Role, Value (A)
secondary: true
secondary: Because this rule does not ignore irrelevant ARIA properties, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
input_aspects:
- DOM Tree
acknowledgments:
Expand Down Expand Up @@ -36,7 +36,7 @@ There are no accessibility support issues known.

## Background

The presence of unknown ARIA attributes is often the result of a typo or other developer error. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412].
The presence of unknown ARIA attributes is often the result of a typo or other developer error. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing.

### Bibliography

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 @@ -17,9 +17,9 @@ accessibility_requirements:
passed: satisfied
inapplicable: satisfied
wcag20:1.3.1: # Info and Relationships (A)
secondary: true
secondary: Because this rule does not ignore irrelevant ARIA properties, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
wcag20:4.1.2: # Name, Role, Value (A)
secondary: true
secondary: Because this rule does not ignore irrelevant ARIA properties, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
input_aspects:
- Accessibility Tree
- CSS styling
Expand Down Expand Up @@ -60,7 +60,7 @@ Implementation of [Presentational Roles Conflict Resolution][] varies from one b

## Background

The presence of prohibited ARIA attributes is often the result of a developer using an incorrect role, or a misunderstanding of the attribute. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412].
The presence of prohibited ARIA attributes is often the result of a developer using an incorrect role, or a misunderstanding of the attribute. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing.

In HTML, there are language features that do not have corresponding implicit WAI-ARIA semantics. As per [ARIA in HTML](https://www.w3.org/TR/html-aria/), those elements can have [global states or properties][global]. Some of those elements can also have [inherited][], [supported][], or [required][] [states][state] or [properties][property] that correspond to a [WAI-ARIA role](https://www.w3.org/TR/wai-aria-1.2/#introroles). For example, the `audio` element has no corresponding ARIA semantics but it can have [inherited][], [supported][], or [required][] [states][state] or [properties][property] of the [`application` role](https://www.w3.org/TR/wai-aria-1.2/#application).

Expand Down
6 changes: 3 additions & 3 deletions _rules/aria-state-or-property-valid-value-6a7281.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ accessibility_requirements:
passed: satisfied
inapplicable: satisfied
wcag20:1.3.1: # Info and Relationships (A)
secondary: true
secondary: Because this rule does not ignore irrelevant ARIA properties, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
wcag20:4.1.2: # Name, Role, Value (A)
secondary: true
secondary: Because this rule does not ignore irrelevant ARIA properties, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
input_aspects:
- DOM Tree
- CSS Styling
Expand Down Expand Up @@ -46,7 +46,7 @@ Some user agents treat the value of `aria-*` attribute as case-sensitive (even w

## Background

Using invalid ARIA attribute values is often the result of a typo or other developer error. These attributes are then either ignored, or a default value is assumed by browsers and assistive technologies. This often means that a state or property which should exist is missing or has an unexpected value. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412]. If the default value for invalid attribute values happens to match the author's intention for the value, there will not be an accessibility issue.
Using invalid ARIA attribute values is often the result of a typo or other developer error. These attributes are then either ignored, or a default value is assumed by browsers and assistive technologies. This often means that a state or property which should exist is missing or has an unexpected value. If the default value for invalid attribute values happens to match the author's intention for the value, there will not be an accessibility issue.

This rule does not require the target of an `ID Reference` to exist. This is because referencing an element that does not exist, and not having the reference at all has the same end result. A common use case for using `ID Reference` for a non-existing ID is to use a static `aria-errormessage` on an `input` element, and to only insert the element with the error message if there is an actual error. There are some cases in which ID references are required. These are tested in a separate rule.

Expand Down
4 changes: 1 addition & 3 deletions _rules/meta-refresh-no-delay-no-exception-bisz58.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
wcag20:2.2.1: # Timing Adjustable (A)
secondary: True
secondary: Because this rule allows no exceptions, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
input_aspects:
- DOM Tree
acknowledgments:
Expand Down Expand Up @@ -63,8 +63,6 @@ Not all major web browsers parse the value of the `content` attribute in the sam

Because a refresh with a timing of 0 is effectively a redirect, it is exempt from this rule. Since refreshing the same page with a time of 0 can cause rapid screen flashes it is strongly recommended to avoid this.

This rule is closely related to [success criterion 2.2.1 Time Adjustable][sc221]. Because this rule is stricter, `meta` elements that pass this rule satisfy 2.1.1 Time Adjustable.

### Bibliography

- [Understanding Success Criterion 2.2.1: Timing Adjustable](https://www.w3.org/WAI/WCAG21/Understanding/timing-adjustable.html)
Expand Down
4 changes: 2 additions & 2 deletions _rules/role-attribute-valid-value-674b10.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
wcag20:1.3.1: # Info and Relationship (A)
secondary: true
secondary: Because this rule does not ignore elements that do not require a role attribute, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
wcag20:4.1.2: # Name, Role, Value (A)
secondary: true
secondary: Because this rule does not ignore elements that do not require a role attribute, it is stricter than this success criterion. Failing this rule often results in this success criterion being not satisfied.
input_aspects:
- DOM Tree
- CSS Styling
Expand Down
9 changes: 1 addition & 8 deletions _rules/text-contrast-afw4f7.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
wcag20:1.4.6: # Contrast (Enhanced) (AAA)
forConformance: true
secondary: true
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
secondary: Because this success criterion has a higher minimum contrast, it is stricter than the rule. This is also why some passed examples do not satisfy this success criterion.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
secondary: Because this success criterion has a higher minimum contrast, it is stricter than the rule. This is also why some passed examples do not satisfy this success criterion.
secondary: Because this success criterion has a higher minimum contrast, it is stricter than the rule. This is why some passed examples do not satisfy this success criterion.

input_aspects:
- Accessibility Tree
- DOM Tree
Expand Down Expand Up @@ -59,8 +55,6 @@ For each test target, the [highest possible contrast][] between the [foreground

Passing this rule does not mean that the text has sufficient color contrast. If all background pixels have a low contrast with all foreground pixels, the success criterion is guaranteed to not be satisfied. When some pixels have sufficient contrast, and others do not, legibility should be considered. There is no clear method for determining legibility, which is why this is out of scope for this rule.

This rule is designed specifically for [1.4.3 Contrast (Minimum)][sc143], which has the expected contrast ratio of 4.5:1 (or 3:1 for large text). Because text that fails a contrast ratio of 4.5:1 also fails a contrast ratio of 7:1, this rule maps to [1.4.6 Contrast (Enhanced)][sc146] as well. In order to adequately test the [expectation](#expectation), some of the passed examples do not satisfy [1.4.6 Contrast (Enhanced)][sc146].

When the text color or background color is not specified in the web page, colors from other [origins][] will be used. Testers must ensure colors are not affected by styles from a [user origin][], such as a custom style sheet. Contrast issues caused by specifying the text color but not the background or vice versa, must be tested separately from this rule.

### Bibliography
Expand Down Expand Up @@ -437,7 +431,6 @@ This text is part of a [disabled][] widget because it is a child of an element w
[purely decorative]: https://www.w3.org/TR/WCAG21/#dfn-pure-decoration 'WCAG 2.1, Purely decorative'
[text node]: https://dom.spec.whatwg.org/#text 'DOM, text node, 2020/07/23'
[sc143]: https://www.w3.org/TR/WCAG21/#contrast-minimum 'WCAG 2.1, Success criterion 1.4.3 Contrast (Minimum)'
[sc146]: https://www.w3.org/TR/WCAG21/#contrast-enhanced 'WCAG 2.1, Success criterion 1.4.6 Contrast (Enhanced)'
[semantic role]: #semantic-role 'Definition of Semantic Role'
[inheriting semantic]: #inheriting-semantic 'Definition of Inheriting Semantic Role'
[user origin]: https://www.w3.org/TR/css3-cascade/#cascade-origin-user 'CSS 3, user origin'
Expand Down