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 5 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
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
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