From 4f72c9fc2649e26ed0046b2e021d2e1d8525396c Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Wed, 30 Aug 2023 11:35:36 +0200 Subject: [PATCH] Move secondary requirement texts out of the background (#2060) * Move secondary requirement texts out of the background * Apply suggestions from code review * fix test * Fix failing test * Secondary reqs on ARIA rules * Update all secondary requirements * Typos * Fix failing tests * Update _rules/link-non-empty-accessible-name-c487ae.md Co-authored-by: Trevor R. Bostic <32486143+tbostic32@users.noreply.github.com> * Tweaked the language some more * Update rule design info for secondary requirements * Fix tests * Apply suggestions from code review Co-authored-by: Kathy Eng * Apply suggestions from code review Co-authored-by: Jean-Yves Moyen --------- Co-authored-by: Trevor R. Bostic <32486143+tbostic32@users.noreply.github.com> Co-authored-by: Kathy Eng Co-authored-by: Jean-Yves Moyen --- __tests__/frontmatter.js | 7 +++++-- __tests__/link-to-glossary-term-valid.js | 1 + __tests__/spelling-ignore.yml | 1 + _rules/aria-attr-defined-5f99a7.md | 8 +++----- .../aria-state-or-property-permitted-5c01ea.md | 8 +++----- ...ria-state-or-property-valid-value-6a7281.md | 8 +++----- _rules/image-no-text-0va7u6.md | 10 ++++++---- _rules/link-in-context-descriptive-5effbb.md | 8 +------- .../link-non-empty-accessible-name-c487ae.md | 6 +----- ...identical-name-equivalent-purpose-b20e66.md | 5 +---- ...-context-serve-equivalent-purpose-fd3a94.md | 13 +++---------- _rules/meta-refresh-no-delay-bc659a.md | 15 ++------------- ...eta-refresh-no-delay-no-exception-bisz58.md | 5 +---- _rules/meta-viewport-b4f0c3.md | 4 +--- _rules/role-attribute-valid-value-674b10.md | 9 +++------ ...le-required-states-and-properties-4e8ab6.md | 8 +++----- ...lable-element-keyboard-accessible-0ssw9k.md | 1 - _rules/text-contrast-afw4f7.md | 9 +-------- _rules/text-contrast-enhanced-09o5cg.md | 2 +- _rules/video-alternative-for-visual-c5a4ea.md | 16 ++-------------- pages/design/atomic-template-empty.md | 2 ++ pages/design/composite-template-empty.md | 2 ++ pages/design/manual-template-empty.md | 2 ++ pages/design/rule-design.md | 18 ++++++++++++++++++ pages/design/rule-template.md | 4 +++- 25 files changed, 69 insertions(+), 103 deletions(-) diff --git a/__tests__/frontmatter.js b/__tests__/frontmatter.js index c93cfd3b8d8..d7c13bb9659 100644 --- a/__tests__/frontmatter.js +++ b/__tests__/frontmatter.js @@ -95,8 +95,11 @@ 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() + if (!accReq) { + return + } else if (accReq.secondary) { + // Note; empty strings & false won't get here, and so aren't allowed + expect(['string', 'boolean']).toContain(typeof accReq.secondary) return } diff --git a/__tests__/link-to-glossary-term-valid.js b/__tests__/link-to-glossary-term-valid.js index e91ed28c309..689e8865f9d 100644 --- a/__tests__/link-to-glossary-term-valid.js +++ b/__tests__/link-to-glossary-term-valid.js @@ -14,6 +14,7 @@ const whitelist = [ /^#expectation(-[1-9][0-9]*)?$/, /^#assumptions$/, /^#accessibility-support$/, + /^#accessibility-requirements-mapping$/, /^#background$/, /^#test-cases$/, /^#passed(-example-[1-9][0-9]*)?$/, diff --git a/__tests__/spelling-ignore.yml b/__tests__/spelling-ignore.yml index b6ab2691017..c66caf271dd 100644 --- a/__tests__/spelling-ignore.yml +++ b/__tests__/spelling-ignore.yml @@ -86,6 +86,7 @@ - RFC - rfc - webauthn +- customizable # spell checker checks against strict casing & hence some repeated words here - Autocomplete diff --git a/_rules/aria-attr-defined-5f99a7.md b/_rules/aria-attr-defined-5f99a7.md index d96f319411c..60c74b84595 100755 --- a/_rules/aria-attr-defined-5f99a7.md +++ b/_rules/aria-attr-defined-5f99a7.md @@ -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: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion. wcag20:4.1.2: # Name, Role, Value (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion. input_aspects: - DOM Tree acknowledgments: @@ -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 @@ -122,5 +122,3 @@ This `canvas` element does not have an `aria-` attribute specified. ``` [wai-aria specifications]: #wai-aria-specifications 'Definition of WAI-ARIA specifications' -[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships -[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value diff --git a/_rules/aria-state-or-property-permitted-5c01ea.md b/_rules/aria-state-or-property-permitted-5c01ea.md index 7236fe6e05c..a82173fd30d 100755 --- a/_rules/aria-state-or-property-permitted-5c01ea.md +++ b/_rules/aria-state-or-property-permitted-5c01ea.md @@ -17,9 +17,9 @@ accessibility_requirements: passed: satisfied inapplicable: satisfied wcag20:1.3.1: # Info and Relationships (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion. wcag20:4.1.2: # Name, Role, Value (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion. input_aspects: - Accessibility Tree - CSS styling @@ -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). @@ -233,5 +233,3 @@ This `div` element is not [included in the accessibility tree][], hence its [WAI [wai-aria state or property]: https://www.w3.org/TR/wai-aria-1.2/#state_prop_def 'Definition of ARIA States and Properties' [namespaced element]: #namespaced-element [prohibited]: https://www.w3.org/TR/wai-aria-1.2/#prohibitedattributes 'WAI-ARIA 1.2 Definition of Prohibited States and Properties' -[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships -[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value diff --git a/_rules/aria-state-or-property-valid-value-6a7281.md b/_rules/aria-state-or-property-valid-value-6a7281.md index aaab1b0ed17..758fff1b263 100755 --- a/_rules/aria-state-or-property-valid-value-6a7281.md +++ b/_rules/aria-state-or-property-valid-value-6a7281.md @@ -12,9 +12,9 @@ accessibility_requirements: passed: satisfied inapplicable: satisfied wcag20:1.3.1: # Info and Relationships (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion. wcag20:4.1.2: # Name, Role, Value (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion. input_aspects: - DOM Tree - CSS Styling @@ -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. @@ -242,7 +242,5 @@ The `aria-hidden` attribute is not on an [HTML or SVG element][]. ``` [html or svg element]: #namespaced-element -[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships -[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value [value type]: https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value [wai-aria state or property]: https://www.w3.org/TR/wai-aria-1.2/#state_prop_def diff --git a/_rules/image-no-text-0va7u6.md b/_rules/image-no-text-0va7u6.md index bfefe9205f9..be5745d8aab 100644 --- a/_rules/image-no-text-0va7u6.md +++ b/_rules/image-no-text-0va7u6.md @@ -12,7 +12,6 @@ accessibility_requirements: inapplicable: further testing needed wcag20:1.4.9: # Images of Text (No Exception) (AAA) forConformance: true - secondary: true failed: not satisfied passed: further testing needed inapplicable: further testing needed @@ -56,7 +55,7 @@ There are no accessibility support issues known. ## Background -This rule is designed specifically for [SC 1.4.5 Images of Text][sc1.4.5] which includes exceptions to the images it applies to that are not part of [SC 1.4.9 Images of Text (No Exception)][sc1.4.9]. Therefore, some images that are inapplicable for this rule can be applicable to [SC 1.4.9 Images of Text (No Exception)][sc1.4.9]. +This rule is designed specifically for [SC 1.4.5 Images of Text][sc1.4.5]. There are however only minimal differences between this criterion and [SC 1.4.9 Images of Text (No Exception)][sc1.4.9]. The two differences are that customizable images of text are allowed, and that images of text are allowed when the presentation cannot otherwise be achieved. These scenarios are so rare the rule ignores them as part of the assumptions, and so the [accessibility requirements mapping](#accessibility-requirements-mapping) of these two criteria is the same. ### Bibliography @@ -210,10 +209,13 @@ This image resource referenced by the `img` element contains text that provides This `img` element loads an SVG with text as an image resource. Because the SVG is loaded as an image resource, instead of being embedded in HTML the text cannot be selected or customized. ```html -WCAG Rocks +" +/> ``` ### Inapplicable diff --git a/_rules/link-in-context-descriptive-5effbb.md b/_rules/link-in-context-descriptive-5effbb.md index 949134e3509..14e18c6cad1 100755 --- a/_rules/link-in-context-descriptive-5effbb.md +++ b/_rules/link-in-context-descriptive-5effbb.md @@ -11,11 +11,7 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:2.4.9: # Link Purpose (Link Only) (AAA) - forConformance: true - secondary: true - failed: not satisfied - passed: further testing needed - inapplicable: further testing needed + secondary: This success criterion is **more strict** than this rule. This is because the rule also considers the context of the link, in addition to the link text. Some of the passed examples do not satisfy this success criterion. input_aspects: - Accessibility Tree - DOM Tree @@ -53,8 +49,6 @@ The [accessible name][] of each target element together with its [programmatical ## Background -This rule is designed specifically for [2.4.4 Link Purpose (In Context)][sc244], which requires the purpose to be clear within the context of a link. Because links that do not have this, also are not clear without that context, this rule maps to [2.4.9 Link Purpose (Link only)][sc249] as well. In order to adequately test the [expectation](#expectation), some of the passed examples do not satisfy [2.4.9 Link Purpose (Link only)][sc249]. - ### Related rules - [Link has non-empty accessible name](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/) diff --git a/_rules/link-non-empty-accessible-name-c487ae.md b/_rules/link-non-empty-accessible-name-c487ae.md index d5385dcffbe..fa197b6c357 100755 --- a/_rules/link-non-empty-accessible-name-c487ae.md +++ b/_rules/link-non-empty-accessible-name-c487ae.md @@ -17,7 +17,6 @@ accessibility_requirements: inapplicable: further testing needed wcag20:2.4.9: # Link Purpose (Link Only) (AAA) forConformance: true - secondary: true failed: not satisfied passed: further testing needed inapplicable: further testing needed @@ -27,7 +26,7 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:1.1.1: # Non-text content (A) - secondary: true + secondary: This success criterion is **related** to this rule. This is because HTML `area` elements are both links and non-text content. Most failed examples satisfy this success criterion. input_aspects: - Accessibility Tree - DOM Tree @@ -66,8 +65,6 @@ The rule assumes that all links are [user interface components](https://www.w3.o ## Background -The HTML `area` element is both a link and non-text content. When this rule fails on `area` elements [success criterion 1.1.1 Non-text content][sc111] is not satisfied. - ### Related rules - [Link in context is descriptive](https://www.w3.org/WAI/standards-guidelines/act/rules/5effbb/proposed/) @@ -365,4 +362,3 @@ This `a` element does not have the role of link because it does not have an `hre [semantic role]: #semantic-role 'Definition of Semantic Role' [attribute value]: #attribute-value 'Definition of Attribute value' [html element]: #namespaced-element -[sc111]: https://www.w3.org/TR/WCAG21/#non-text-content diff --git a/_rules/links-identical-name-equivalent-purpose-b20e66.md b/_rules/links-identical-name-equivalent-purpose-b20e66.md index ae422badadd..1b171cf25c1 100755 --- a/_rules/links-identical-name-equivalent-purpose-b20e66.md +++ b/_rules/links-identical-name-equivalent-purpose-b20e66.md @@ -11,7 +11,7 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:2.4.4: # Link Purpose (In Context) (A) -secondary: true +secondary: This success criterion is **less strict** than this rule. This is because the rule does not consider the context of the link. Some of the failed examples satisfy this success criterion. input_aspects: - Accessibility Tree - DOM Tree @@ -57,8 +57,6 @@ When followed, the links in each set of target elements resolve to the [same res ## Background -This rule is closely related to [success criterion 2.4.4 Link Purpose (In Context)][sc244]. Because this rule is stricter, links that pass this rule satisfy 2.4.4 Link Purpose (In Context). - ### Bibliography - [CSS Scoping Module Level 1 (editor's draft)](https://drafts.csswg.org/css-scoping/) @@ -389,7 +387,6 @@ These `span` elements do not have a [semantic role][] of `link`. They are not va [presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution' [same resource]: #same-resource 'Definition of same resource' [sc249]: https://www.w3.org/TR/WCAG21/#link-purpose-link-only 'Success Criterion 2.4.9: Link Purpose (Link Only)' -[sc244]: https://www.w3.org/TR/WCAG21/#link-purpose-in-context 'Success Criterion 2.4.4: Link Purpose (In Context)' [semantic role]: #semantic-role 'Definition of semantic role' [shadow tree]: https://dom.spec.whatwg.org/#shadow-tree 'Definition of shadow tree' [web page (html)]: #web-page-html 'Definition of web page (HTML)' diff --git a/_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md b/_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md index 0d0715b8fc9..d8b228511c9 100755 --- a/_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md +++ b/_rules/links-with-identical-names-and-context-serve-equivalent-purpose-fd3a94.md @@ -11,11 +11,7 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:2.4.9: # Link Purpose (Link Only) (AAA) - forConformance: true - secondary: true - failed: not satisfied - passed: further testing needed - inapplicable: further testing needed + secondary: This success criterion is **more strict** than this rule. This is because the rule also considers the context of the link, in addition to the link text. Some of the passed examples do not satisfy this success criterion. input_aspects: - DOM Tree - CSS Styling @@ -64,9 +60,7 @@ There are no accessibility support issues known. ## Background -This rule is designed specifically for [2.4.4 Link Purpose (In Context)][sc244], which requires the purpose to be clear within the context of a link. Because links that do not have this, also are not clear without that context, this rule maps to [2.4.9 Link Purpose (Link only)][sc249] as well. In order to adequately test the [expectation](#expectation), some of the passed examples do not satisfy [2.4.9 Link Purpose (Link only)][sc249]. - -There is a difference between two contexts being the *same* and being *identical*. This rule specifically targets links within the *same* context. The same context means exactly the same set of DOM nodes. Identical (but not the same) contexts might have a different set of DOM nodes, but those DOM nodes have equivalent content - such as text content, attribute values, and so on. This difference is similar to the difference in some programming languages between pointer equivalence and deep object equivalence. Links with identical name that are in identical (but not the same) contexts also fail [2.4.4 Link Purpose (In Context)][sc244]. However, defining "identical context" unambiguously has been deemed infeasible at this time, and so has been left out of this rule. +There is a difference between two contexts being the _same_ and being _identical_. This rule specifically targets links within the _same_ context. The same context means exactly the same set of DOM nodes. Identical (but not the same) contexts might have a different set of DOM nodes, but those DOM nodes have equivalent content - such as text content, attribute values, and so on. This difference is similar to the difference in some programming languages between pointer equivalence and deep object equivalence. Links with identical name that are in identical (but not the same) contexts also fail [2.4.4 Link Purpose (In Context)][sc244]. However, defining "identical context" unambiguously has been deemed infeasible at this time, and so has been left out of this rule. ### Bibliography @@ -374,7 +368,7 @@ These two `span` elements do not have a [semantic role][] of link. #### Inapplicable Example 5 -These two HTML `a` elements have the same [accessible name][] and link to the [same resource][] but different [programmatically determined link contexts][programmatically determined link context]. Even though the two contexts in this example are *identical*, they are not the *same*. That is: even though they have equivalent content, they do not consist of the same DOM elements. +These two HTML `a` elements have the same [accessible name][] and link to the [same resource][] but different [programmatically determined link contexts][programmatically determined link context]. Even though the two contexts in this example are _identical_, they are not the _same_. That is: even though they have equivalent content, they do not consist of the same DOM elements. ```html @@ -407,7 +401,6 @@ These two HTML `a` elements have the same [accessible name][] but different [pro [programmatically determined link context]: #programmatically-determined-link-context 'Definition of programmatically determined link context' [same resource]: #same-resource 'Definition of same resource' [sc244]: https://www.w3.org/TR/WCAG21/#link-purpose-in-context 'Success Criterion 2.4.4: Link Purpose (In Context)' -[sc249]: https://www.w3.org/TR/WCAG21/#link-purpose-link-only 'Success Criterion 2.4.9: Link Purpose (Link Only)' [semantic role]: #semantic-role 'Definition of semantic role' [shadow tree]: https://dom.spec.whatwg.org/#shadow-tree 'Definition of shadow tree' [web page (html)]: #web-page-html 'Definition of web page (HTML)' diff --git a/_rules/meta-refresh-no-delay-bc659a.md b/_rules/meta-refresh-no-delay-bc659a.md index 21a03e22c88..29c6822aef7 100755 --- a/_rules/meta-refresh-no-delay-bc659a.md +++ b/_rules/meta-refresh-no-delay-bc659a.md @@ -11,17 +11,9 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:2.2.4: # Interruptions (AAA) - forConformance: true - secondary: true - failed: not satisfied - passed: further testing needed - inapplicable: further testing needed + secondary: This success criterion is **more strict** than this rule. This is because the rule allows redirects longer than 20 hours. Some of the passed examples do not satisfy this success criterion. wcag20:3.2.5: # Change on Request (AAA) - forConformance: true - secondary: true - failed: not satisfied - passed: further testing needed - inapplicable: further testing needed + secondary: This success criterion is **more strict** than this rule. This is because the rule allows redirects longer than 20 hours. Some of the passed examples do not satisfy this success criterion. wcag-technique:G110: # Using an instant client-side redirect forConformance: false failed: not satisfied @@ -71,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 a redirect, it is exempt from this rule. Since this can cause rapid screen flashes it is strongly recommended to avoid this. -This rule is designed specifically for [2.2.1 Timing Adjustable][sc221], which can be satisfied if the time limit is over 20 hours long. All pages that fail this because of a "refresh" `meta` element also do not satisfy [3.2.5 Change on Request][sc325]. In order to adequately test the [expectation](#expectation), some of the passed examples do not satisfy [3.2.5 Change on Request][sc325]. - ### Bibliography - [Understanding Success Criterion 2.2.1: Timing Adjustable](https://www.w3.org/WAI/WCAG21/Understanding/timing-adjustable.html) @@ -282,5 +272,4 @@ This 'meta' element contains an invalid `content` attribute and will not refresh [attribute value]: #attribute-value 'Definition of Attribute Value' [meta refresh]: https://html.spec.whatwg.org/#attr-meta-http-equiv-refresh 'HTML specification of the meta refresh State' [sc221]: https://www.w3.org/TR/WCAG21/#timing-adjustable 'WCAG 2.1 Success Criterion 2.2.1 Timing Adjustable' -[sc325]: https://www.w3.org/TR/WCAG21/#change-on-request 'WCAG 2.1 Success Criterion 3.2.5 Change on Request' [shared declarative refresh steps]: https://html.spec.whatwg.org/#shared-declarative-refresh-steps 'HTML specification of the Shared Declarative Refresh Steps' diff --git a/_rules/meta-refresh-no-delay-no-exception-bisz58.md b/_rules/meta-refresh-no-delay-no-exception-bisz58.md index dbd1a5b76fd..ac2bbf6ea23 100755 --- a/_rules/meta-refresh-no-delay-no-exception-bisz58.md +++ b/_rules/meta-refresh-no-delay-no-exception-bisz58.md @@ -26,7 +26,7 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:2.2.1: # Timing Adjustable (A) - secondary: True + secondary: This success criterion is **less strict** than this rule. This is because this criterion allows redirects longer than 20 hours. Some of the failed examples satisfy this success criterion. input_aspects: - DOM Tree acknowledgments: @@ -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) @@ -218,4 +216,3 @@ This `meta` element has an invalid `content` attribute, and is therefore inappli [attribute value]: #attribute-value 'Definition of Attribute Value' [meta refresh]: https://html.spec.whatwg.org/#attr-meta-http-equiv-refresh 'HTML specification of the meta refresh State' [shared declarative refresh steps]: https://html.spec.whatwg.org/#shared-declarative-refresh-steps 'HTML specification of the Shared Declarative Refresh Steps' -[sc221]: https://www.w3.org/TR/WCAG21/#timing-adjustable diff --git a/_rules/meta-viewport-b4f0c3.md b/_rules/meta-viewport-b4f0c3.md index 17f3a02fa85..46d9ecb72ea 100755 --- a/_rules/meta-viewport-b4f0c3.md +++ b/_rules/meta-viewport-b4f0c3.md @@ -11,7 +11,7 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag21:1.4.10: # Reflow (AA) - secondary: true + secondary: This success criterion is **related** to this rule. This is because a page that cannot be zoomed up to 200% often does not reflow sufficiently either. Most failed examples satisfy this success criterion. input_aspects: - DOM Tree acknowledgments: @@ -51,8 +51,6 @@ Desktop browsers ignore the viewport `meta` element, and most modern mobile brow ## Background -This rule is designed specifically for [1.4.4 Resize text][sc144], which requires that text can be resized up to 200%. Because text that can not be resized up to 200% can not fit in an area of 320 by 256 [CSS pixels][], this rule maps to [1.4.10 Reflow][sc1410] as well. All passed examples in this rule satisfy both success criteria. - ### Bibliography - [Understanding Success Criterion 1.4.4: Resize text](https://www.w3.org/WAI/WCAG21/Understanding/resize-text) diff --git a/_rules/role-attribute-valid-value-674b10.md b/_rules/role-attribute-valid-value-674b10.md index 54acdc4ba18..70971c167d5 100755 --- a/_rules/role-attribute-valid-value-674b10.md +++ b/_rules/role-attribute-valid-value-674b10.md @@ -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: This success criterion is **less strict** than this rule. This is because the success criterion can be satisfied by an element's implicit role when the explicit role is incorrect. Some of the failed examples may satisfy this success criterion. wcag20:4.1.2: # Name, Role, Value (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because the success criterion can be satisfied by an element's implicit role when the explicit role is incorrect. Some of the failed examples may satisfy this success criterion. input_aspects: - DOM Tree - CSS Styling @@ -50,7 +50,7 @@ Older browsers do not support more than one token in the value for a role attrib ## Background -Using an invalid role is often the result of a typo or other developer error. Unknown roles are ignored by browsers and assistive technologies, and the element's [implicit role][] is used. This often means that a role that should exist is missing. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Role, Value][sc412]. If the element's implicit semantics are sufficient to communicate its intent, an invalid role may not cause an accessibility issue. +Using an invalid role is often the result of a typo or other developer error. Unknown roles are ignored by browsers and assistive technologies, and the element's [implicit role][] is used. This often means that a role that should exist is missing. The `role` attribute is a set of [space separated tokens][]. Having a [whitespace](#whitespace) separated list of more than one token in the value of the role attribute is used for what is known as _fallback roles_. If the first token is not accessibility supported (or valid), the next one will be used for determining the [semantic role][] of the element, and so forth. The rule applies to attributes containing at least one non-[ASCII whitespace][] character so that there is at least one token in the set. @@ -182,10 +182,7 @@ This `role` attribute is specified on an element which is [programmatically hidd [implicit role]: #implicit-role 'Definition of Implicit Role' [programmatically hidden]: #programmatically-hidden 'Definition of Programmatically Hidden' [role attribute]: https://www.w3.org/TR/role-attribute/ 'Specification of the Role attribute' -[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships 'Success Criterion 1.3.1 Info and Relationship' [semantic role]: #semantic-role 'Definition of Semantic Role' [space separated tokens]: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#space-separated-tokens 'Definition of space separated tokens' [wai-aria role]: https://www.w3.org/TR/wai-aria-1.2/#role_definitions 'List of WAI-ARIA roles' [wai-aria specifications]: #wai-aria-specifications 'Definition of WAI-ARIA Specifications' -[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships -[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value diff --git a/_rules/role-required-states-and-properties-4e8ab6.md b/_rules/role-required-states-and-properties-4e8ab6.md index e170a6765fa..295e8ead816 100755 --- a/_rules/role-required-states-and-properties-4e8ab6.md +++ b/_rules/role-required-states-and-properties-4e8ab6.md @@ -16,9 +16,9 @@ accessibility_requirements: passed: satisfied inapplicable: satisfied wcag20:1.3.1: # Info and Relationships (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because browsers and assistive technologies will often fall back on a non-standard default value, which may be sufficient. Some of the failed examples may satisfy this success criterion. wcag20:4.1.2: # Name, Role, Value (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because browsers and assistive technologies will often fall back on a non-standard default value, which may be sufficient. Some of the failed examples may satisfy this success criterion. input_aspects: - DOM Tree acknowledgments: @@ -50,7 +50,7 @@ This rule relies on browsers and assistive technologies to support leaving out [ ## Background -Omitting required ARIA properties is often the result of a developer error. When required properties are missing some browsers and assistive technologies will guess the property, or leave the element inaccessible. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412]. +Omitting required ARIA properties is often the result of a developer error. When required properties are missing some browsers and assistive technologies will guess the property, or leave the element inaccessible. This rule is testing author built components, not user-agent built ones. Elements that keep their [implicit semantic role][] are mapped into conforming accessible objects, with all required properties, by user agents and are therefore not tested by this rule. Most of these mappings are defined in the [HTML Accessibility API Mappings, Attribute State and Property Mappings](https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings). @@ -228,5 +228,3 @@ This `combobox` is not [included in the accessibility tree][] due to its styling [wai-aria 1.2]: https://www.w3.org/TR/wai-aria-1.2/ [html or svg element]: #namespaced-element [focusable]: #focusable -[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships -[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value diff --git a/_rules/scrollable-element-keyboard-accessible-0ssw9k.md b/_rules/scrollable-element-keyboard-accessible-0ssw9k.md index 3246c71698f..74f3d3da2ae 100755 --- a/_rules/scrollable-element-keyboard-accessible-0ssw9k.md +++ b/_rules/scrollable-element-keyboard-accessible-0ssw9k.md @@ -12,7 +12,6 @@ accessibility_requirements: inapplicable: further testing needed wcag20:2.1.3: # Keyboard (No Exceptions) (AAA) forConformance: true - secondary: true failed: not satisfied passed: further testing needed inapplicable: further testing needed diff --git a/_rules/text-contrast-afw4f7.md b/_rules/text-contrast-afw4f7.md index 00af35f262c..aec1553c885 100755 --- a/_rules/text-contrast-afw4f7.md +++ b/_rules/text-contrast-afw4f7.md @@ -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: This success criterion is **more strict** than this rule. This is because this criterion has a higher minimum contrast. Some of the passed examples do not satisfy this success criterion. input_aspects: - Accessibility Tree - DOM Tree @@ -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 when some but not all pixels have sufficient contrast, which is why passing this rule does not necessarily mean the corresponding success criterion is met. -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 @@ -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' diff --git a/_rules/text-contrast-enhanced-09o5cg.md b/_rules/text-contrast-enhanced-09o5cg.md index 4f3a11e9700..c52fa2bfff2 100644 --- a/_rules/text-contrast-enhanced-09o5cg.md +++ b/_rules/text-contrast-enhanced-09o5cg.md @@ -21,7 +21,7 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:1.4.3: # Contrast (Minimum) (A) - secondary: true + secondary: This success criterion is **less strict** than this rule. This is because this criterion has a lower minimum contrast. Some of the failed examples may satisfy this success criterion. input_aspects: - Accessibility Tree - DOM Tree diff --git a/_rules/video-alternative-for-visual-c5a4ea.md b/_rules/video-alternative-for-visual-c5a4ea.md index fe477010075..bffca6022c1 100755 --- a/_rules/video-alternative-for-visual-c5a4ea.md +++ b/_rules/video-alternative-for-visual-c5a4ea.md @@ -11,17 +11,9 @@ accessibility_requirements: passed: further testing needed inapplicable: further testing needed wcag20:1.2.5: # Audio Description (Prerecorded) (AA) - forConformance: true - secondary: true - failed: not satisfied - passed: further testing needed - inapplicable: further testing needed + secondary: This success criterion is **more strict** than this rule. This is because the rule allows a media alternative in place of audio description. Some of the passed examples do not satisfy this success criterion. wcag20:1.2.8: # Media Alternative (Prerecorded) (AAA) - forConformance: true - secondary: true - failed: not satisfied - passed: further testing needed - inapplicable: further testing needed + secondary: This success criterion is **more strict** than this rule. This is because the rule allows audio description in place of a media alternative. Some of the passed examples do not satisfy this success criterion. wcag-technique:G8: # Providing a movie with extended audio descriptions forConformance: false failed: not satisfied @@ -82,8 +74,6 @@ The HTML `video` element can also have a `track` element that provides an audio ## Background -This rule is designed specifically for [1.2.3 Audio Description or Media Alternative (Prerecorded)][sc123], which expects either audio description or a media alternative. If a video has neither, by definition it also fails for both [1.2.5 Audio Description (Prerecorded)][sc125] and [1.2.8 Media Alternative (Prerecorded)][sc128]. In order to adequately test the [expectation](#expectation) of this rule, some of the passed examples do not satisfy [1.2.5 Audio Description (Prerecorded)][sc125] or [1.2.8 Media Alternative (Prerecorded)][sc128]. - ### Bibliography - [Understanding Success Criterion 1.2.5: Audio Description (Prerecorded)](https://www.w3.org/WAI/WCAG21/Understanding/audio-description-prerecorded.html) @@ -225,5 +215,3 @@ A video element that is not [visible][]. [visible]: #visible 'Definition of visible' [sc123]: https://www.w3.org/TR/WCAG21/#audio-description-or-media-alternative-prerecorded 'WCAG 2.1, Success Criterion 1.2.3 Audio Description or Media Alternative (Prerecorded)' -[sc125]: https://www.w3.org/TR/WCAG21/#audio-description-prerecorded 'WCAG 2.1, Success Criterion 1.2.5 Audio Description (Prerecorded)' -[sc128]: https://www.w3.org/TR/WCAG21/#media-alternative-prerecorded 'WCAG 2.1, Success Criterion 1.2.8 Media Alternative (Prerecorded)' diff --git a/pages/design/atomic-template-empty.md b/pages/design/atomic-template-empty.md index 447ea1c52c1..df5fee5eba6 100755 --- a/pages/design/atomic-template-empty.md +++ b/pages/design/atomic-template-empty.md @@ -10,6 +10,8 @@ accessibility_requirements: # Remove whatever is not applicable failed: not satisfied passed: satisfied | further testing needed inapplicable: satisfied | further testing needed + wcag20:z.z.z: # (A | AA | AAA) + secondary: This success criterion is ... aria12:anchor-name: # title: Title to display forConformance: true | false diff --git a/pages/design/composite-template-empty.md b/pages/design/composite-template-empty.md index 0f83720a8ea..a8037bd07ae 100755 --- a/pages/design/composite-template-empty.md +++ b/pages/design/composite-template-empty.md @@ -10,6 +10,8 @@ accessibility_requirements: # Remove whatever is not applicable failed: not satisfied passed: satisfied | further testing needed inapplicable: satisfied | further testing needed + wcag20:z.z.z: # (A | AA | AAA) + secondary: This success criterion is ... aria12:anchor-name: # title: Title to display forConformance: true | false diff --git a/pages/design/manual-template-empty.md b/pages/design/manual-template-empty.md index 09f1b20ffef..d619d930eb6 100644 --- a/pages/design/manual-template-empty.md +++ b/pages/design/manual-template-empty.md @@ -10,6 +10,8 @@ accessibility_requirements: # Remove whatever is not applicable failed: not satisfied passed: satisfied | further testing needed inapplicable: satisfied | further testing needed + wcag20:z.z.z: # (A | AA | AAA) + secondary: This success criterion is ... aria12:anchor-name: # title: Title to display forConformance: true | false diff --git a/pages/design/rule-design.md b/pages/design/rule-design.md index 5727374d87c..122d2e50939 100755 --- a/pages/design/rule-design.md +++ b/pages/design/rule-design.md @@ -63,6 +63,24 @@ The description is a short synopsis of what the rule does. This should be declar List all accessibility requirements that are not satisfied if one or more outcomes of a rule fails. For example, this could be one or more WCAG success criteria, or a WAI-ARIA rule. Each requirement should indicate the associated conformance level, and map the implications of each outcome, such as "satisfied", "not satisfied", or "further testing needed". +Accessibility requirements should be listed as secondary if the requirement is related to the rule. There are four scenarios: + +1. The requirement is less strict than the rule. If this occurs, and some but not all failed examples of the rule pass the accessibility requirement, the following text should be used: + + > This success criterion is **less strict** than this rule. This is because {reason}. Some of the failed examples satisfy this success criterion. + +1. The requirement is more strict than the rule. If this occurs, and some but not all passed examples of the rule fail the accessibility requirement, the following text should be used: + + > secondary: This success criterion is **more strict** than this rule. This is because {reason}. Some of the passed examples do not satisfy this success criterion. + +1. The requirement is related to, but different from the rule. This often happens when there is overlap between two accessibility requirements. If this occurs, and some but not all the failed examples of the rule fail the accessibility requirement, the following text should be used: + > This success criterion is **related** to this rule. This {is because / happens for} {reason}. Most failed examples satisfy this success criterion. + + +1. Atomic rules used in composite rules should list the requirements from the composite rule as "more strict" secondary requirements. + +Secondary requirements are optional and are only necessary when a requirement fails some of the passed examples or passes some of the failed examples. If there are no such examples, it is generally not necessary to include secondary requirements. + **Note**: When linking to WCAG or other sources that may have several versions, use the version number where the relevant requirement was first introduced. For more details, see [ACT Rules Format: Accessibility Requirements Mapping](https://www.w3.org/TR/act-rules-format/#accessibility-requirements-mapping). diff --git a/pages/design/rule-template.md b/pages/design/rule-template.md index 12756f3e950..6f11233b2b8 100755 --- a/pages/design/rule-template.md +++ b/pages/design/rule-template.md @@ -16,11 +16,13 @@ rule_type: atomic description: | This rule checks ... accessibility_requirements: - wcag20:x.x.x: # (Name of Success Criterion) + wcag20:x.x.x: # (A | AA | AAA) forConformance: true | false failed: not satisfied passed: satisfied | further testing needed inapplicable: satisfied | further testing needed + wcag20:z.z.z: # (A | AA | AAA) + secondary: This success criterion is ... aria12:anchor-name: # title: Title to display forConformance: true | false