From aeafb906d9c8617d451285440315c644a4673598 Mon Sep 17 00:00:00 2001 From: "U-CPHDOMAIN\\dtr" Date: Tue, 4 Apr 2023 12:25:25 -0400 Subject: [PATCH 01/20] invalid-form-field-value-36b590: updating failed example 2. --- _rules/invalid-form-field-value-36b590.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/invalid-form-field-value-36b590.md b/_rules/invalid-form-field-value-36b590.md index c24aea1c975..1797def5638 100644 --- a/_rules/invalid-form-field-value-36b590.md +++ b/_rules/invalid-form-field-value-36b590.md @@ -171,7 +171,7 @@ This `input` element has a [form field error indicator][] but its message does n
- Please enter the correct text.
+ Invalid value for age.
``` From 81caf8a7c954a6869da49443bf5eef015e9b346a Mon Sep 17 00:00:00 2001 From: "U-CPHDOMAIN\\dtr" Date: Thu, 17 Aug 2023 15:04:08 -0400 Subject: [PATCH 02/20] Adding examples to rule presentational-children-no-focusable-content-307n5z --- ...al-children-no-focusable-content-307n5z.md | 99 +++++++++++++++++-- 1 file changed, 93 insertions(+), 6 deletions(-) diff --git a/_rules/presentational-children-no-focusable-content-307n5z.md b/_rules/presentational-children-no-focusable-content-307n5z.md index 0385a7d541f..aad6939ba85 100755 --- a/_rules/presentational-children-no-focusable-content-307n5z.md +++ b/_rules/presentational-children-no-focusable-content-307n5z.md @@ -67,7 +67,7 @@ None of these `button` elements has [descendants][] that are included in [sequen #### Passed Example 2 -This element with `checkbox` role has no [descendants][] that are included in [sequential focus navigation][]. Instead the link to the terms of service is adjacent, and `aria-labelledby` is used to provide its [accessible name][]. +This element with the `checkbox` role has no [descendants][] that are included in [sequential focus navigation][]. Instead the link to the terms of service is adjacent, and `aria-labelledby` is used to provide its [accessible name][]. ```html

@@ -80,7 +80,7 @@ This element with `checkbox` role has no [descendants][] that are included in [s #### Passed Example 3 -This element with `menuitemcheckbox` role has an `input` element as a descendant. Because the `input` is disabled it is not included in [sequential focus navigation][]. +This element with the `menuitemcheckbox` role has an `input` element as a descendant. Because the `input` is disabled it is not included in [sequential focus navigation][]. **Note**: The `input` checkbox has a `role` [attribute value][] of `none` to ensure it is ignored by browsers that do not support [presentational children][]. @@ -93,6 +93,15 @@ This element with `menuitemcheckbox` role has an `input` element as a descendant ``` +#### Passed Example 4 + +This ` +``` + + ### Failed #### Failed Example 1 @@ -108,7 +117,7 @@ This `button` element has a [child][] `span` element. Because the `span` element #### Failed Example 2 -This element with `checkbox` role has an `a` element as a [child][]. Because the `a` element has an `href` attribute, it is included in [sequential focus navigation][]. +This element with the `checkbox` role has an `a` element as a [child][]. Because the `a` element has an `href` attribute, it is included in [sequential focus navigation][]. ```html

I agree to the terms of service

@@ -116,7 +125,7 @@ This element with `checkbox` role has an `a` element as a [child][]. Because the #### Failed Example 3 -This element with `menuitemcheckbox` role has a checkbox as a child. Because the checkbox is not disabled, it is included in [sequential focus navigation][]. +This element with the `menuitemcheckbox` role has a checkbox as a child. Because the checkbox is not disabled, it is included in [sequential focus navigation][]. ```html ``` +#### Failed Example 4 + +This element with the `tab` role contains an `` element. The `tab` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `tab` role fails the rule. (This tablist implementation is non-functional for users. It's not meant to function - it's only meant to show roles.) + +```html + +``` + +#### Failed Example 5 + +This element with the `img` role contains an `` element. The `img` role has [presentational children][]. The `` element is included in [sequential focus navigation][]. So the element with the `img` role fails the rule. (Interestingly, no similar failure is possible with a standard HTML `` element, because according to the HTML specification, the `` element has no closing tag. So it's impossible to put anything inside of an `` element.) + +```html +****** This ASCII art ******* contains a link. +``` + ### Inapplicable #### Inapplicable Example 1 -This element has a `link` role which does not have [presentational children][]. +None of the roles involved in this semantic table have [presentational children][]. (The roles are `table`, `row`, and `cell`, respectively, for the ``, ``, and `
` elements.) So this rule does not apply. ```html -W3C Website + + + + + + + + + + + + +
semantic table header
anchor in semantic table - no problem
``` +#### Inapplicable Example 2 + +This `` element has a `link` role, which does not have [presentational children][]. So this element - perhaps surprisingly - does not fail this rule, because it's inapplicable. This is the case even though it's invalid HTML. Any time there's a link as the outer element, that will be inapplicable under this rule. (If the elements were switched - that is, if the ` +``` + +#### Inapplicable Example 3 + +The applicability of this rule does not include elements with an explicit role of `presentation`. Only implicit (through roles with [presentational children][]). This example shows that. + +```html + +``` + +#### Inapplicable Example 4 + +The applicability of this rule does not include hidden elements. It only includes presentational elements (through roles with [presentational children][]). These two terms - "hidden" and "presentational" - are often confused. When an element is "hidden", that means that it is completely omitted from the accessibility tree. When an element is "presentational", that means that its semantic role is omitted from the accessibility tree, but its content remains. + +The [ARIA 1.2 specification]https://www.w3.org/TR/wai-aria-1.2/#presentation) mentions this confusion: +
    +
  • +Many individuals erroneously consider role="presentation" to be synonymous with aria-hidden="true" +
  • +
  • +... the presentation role causes a given element to be treated as having no role or to be removed from the accessibility tree, but does not cause the content contained within the element to be removed from the accessibility tree. +
  • +
+ +Adding to this confusion is a third term: "decorative". The words "decorative" and "presentational" are often used interchangeably, but that usage is inaccurate. The word "decorative" often appears in a sentence such as "marking an image as decorative" - that is, by adding `alt=""` to an `` element. "Decorative" in that context does mean "hidden" - and "hidden", again, is different from "presentational" - so using "decorative" and "presentational" interchangeably is inaccurate. At the time of writing (August 2023), the ACT definition of "[marked as decorative][]" unfortunately encourages this inaccurate usage: it states that An element is marked as decorative if ... it has an explicit role of none or presentation. + +At any rate: this example shows that this rule does not apply to hidden elements. + +```html + +``` + + [accessible name]: #accessible-name 'Definition of Accessible name' [attribute value]: #attribute-value 'Definition of Attribute value' [semantic role]: #semantic-role 'Definition of Semantic role' @@ -147,3 +233,4 @@ This element has a `link` role which does not have [presentational children][]. [sequential focus navigation]: https://html.spec.whatwg.org/#sequential-focus-navigation 'HTML sequential focus navigation, 2020/10/21' [flat tree]: https://drafts.csswg.org/css-scoping/#flat-tree 'CSS Scoping definition of Flat tree, working draft' [html or svg element]: #namespaced-element +[marked as decorative]: /glossary/#marked-as-decorative \ No newline at end of file From 22022c031e1f3d990c8b85d3f44295600724bc96 Mon Sep 17 00:00:00 2001 From: Dan Tripp <113939352+dan-tripp-siteimprove@users.noreply.github.com> Date: Thu, 31 Aug 2023 21:48:10 -0400 Subject: [PATCH 03/20] Update _rules/presentational-children-no-focusable-content-307n5z.md --- _rules/presentational-children-no-focusable-content-307n5z.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/presentational-children-no-focusable-content-307n5z.md b/_rules/presentational-children-no-focusable-content-307n5z.md index aad6939ba85..7c2e34ed533 100755 --- a/_rules/presentational-children-no-focusable-content-307n5z.md +++ b/_rules/presentational-children-no-focusable-content-307n5z.md @@ -160,7 +160,7 @@ This element with the `img` role contains an `` element. The `img` role has #### Inapplicable Example 1 -None of the roles involved in this semantic table have [presentational children][]. (The roles are `table`, `row`, and `cell`, respectively, for the ``, ``, and `
` elements.) So this rule does not apply. +None of the roles involved in this semantic table have [presentational children][]. (The roles are `table`, `row`, `cell`, `button`, and `link`, for the ``, ``, `
`, `