From a208bccb34a7d2e3fa68c90fd5ac303b6859ec6c Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Thu, 12 Nov 2020 14:28:34 +0100 Subject: [PATCH 1/7] Modernise writing style --- pages/glossary/disabled-element.md | 39 +++++++----------------------- 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/pages/glossary/disabled-element.md b/pages/glossary/disabled-element.md index ec7fe77335d..2d045adc093 100755 --- a/pages/glossary/disabled-element.md +++ b/pages/glossary/disabled-element.md @@ -7,38 +7,17 @@ input_aspects: - DOM tree --- -An element is considered disabled when it has been rendered [inoperable][] using one of the following properties: +An element is _disabled_ when it has been rendered [inoperable][] in one of the following ways: -1. The [`disabled`][disabled] attribute. The presence of this attribute, regardless of its value, on a +1. The element matches the [`:disabled` pseudo-class][disabled pseudo-class], for HTML elements, it means that the element is [actually disabled][]. - - [`button`][button], - - [`input`][input], - - [`select`][select], - - [`textarea`][textarea], - - [form-associated custom element][], - - or [`fieldset`][fieldset] element +2. The element has a [shadow-including ancestor][] whose `aria-disabled` [attribute value][] is "true". - will disable the element itself if it is not a [`fieldset`][fieldset] or, if it is, will disable any [descendants][descendant] of the element, excluding those that are [descendants][descendant] of the first [`legend`][legend] [child][] of the element. + **Note:** When the `aria-disabled` attribute is specified on an element, it is assumed that the element has also been disabled for users that do not rely on [assistive technology][]. For example, this can be done by disabling pointer events using the `pointer-events` property and by disabling keyboard interactions using the `tabindex` attribute. - **Note:** When the [`disabled`][disabled] attribute is specified on a [`fieldset`][fieldset] element, [shadow-including descendants][shadow-including descendant] are **not** disabled by default. Such behavior may however be explicitly implemented by [form-associated custom elements][form-associated custom element]. - -2. The [`aria-disabled`][aria-disabled] attribute. The presence of this attribute with a value that is an [ASCII case-insensitive](https://infra.spec.whatwg.org/#ascii-case-insensitive) match for `true` on an element will communicate its state, and the state of its [shadow-including descendants][shadow-including descendant], as "disabled" to [assistive technology][]. - - **Note:** When the [`aria-disabled`][aria-disabled] attribute is specified on an element, it is assumed that the element has also been disabled for users that do not rely on [assistive technology][]. For example, this can be done by disabling pointer events using the [`pointer-events`][pointer-events] property and by disabling keyboard interactions using the [`tabindex`][tabindex] attribute. - -[aria-disabled]: https://www.w3.org/TR/wai-aria/#aria-disabled -[assistive technology]: https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies) -[button]: https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element -[child]: https://dom.spec.whatwg.org/#concept-tree-child -[descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant -[disabled]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-disabled -[fieldset]: https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element -[form-associated custom element]: https://html.spec.whatwg.org/multipage/custom-elements.html#form-associated-custom-element -[input]: https://html.spec.whatwg.org/multipage/input.html#the-input-element -[legend]: https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element +[actually disabled]: https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled 'HTML definition of Actually Disabled' +[assistive technology]: https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies +[attribute value]: #atttribute-value 'Definition of Attribute Value' +[disabled pseudo-class]: https://drafts.csswg.org/selectors/#disabled-pseudo "CSS Selectors Level 4 (Editor's Draft), definition of the :disabled pseudo-class" [inoperable]: https://www.w3.org/TR/wai-aria/#dfn-operable -[pointer-events]: https://www.w3.org/TR/SVG2/interact.html#PointerEventsProperty -[select]: https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element -[shadow-including descendant]: https://dom.spec.whatwg.org/#concept-shadow-including-descendant -[tabindex]: https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute -[textarea]: https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element +[shadow-including ancestor]: https://dom.spec.whatwg.org/#concept-shadow-including-ancestor From fdcbfb6138b92c03df5838fc74a1a1c9294991b6 Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Thu, 12 Nov 2020 14:33:01 +0100 Subject: [PATCH 2/7] Copy Assumption from definition to rule --- _rules/text-contrast-afw4f7.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_rules/text-contrast-afw4f7.md b/_rules/text-contrast-afw4f7.md index db29a4525e1..46d5078e846 100755 --- a/_rules/text-contrast-afw4f7.md +++ b/_rules/text-contrast-afw4f7.md @@ -46,6 +46,8 @@ For each test target, the [highest possible contrast][] between the [foreground - Text that has the same foreground and background color (a contrast ratio of 1:1) is not considered to be "visual presentation of text", making it inapplicable to the success criterion. Text hidden in this way can still cause accessibility issues under other success criteria, depending on the content. +- The definition of [disabled element][disabled] assumes that the presence of the `aria-disabled` attribute is matched by similar techniques for users not relying on assistive technologies. If this is not the case, that definition may produce incorrect results and in consequence this rule might be Inapplicable to some text nodes that still require a good contrast ratio. + ## Accessibility Support - Different browsers have different levels of support for CSS. This can cause contrast issues in one browser that do not appear in another. Because of that, this rule can produce different results depending on the browser that is used. For example, a text that is positioned using CSS transform may be on a different background in a browser that does not support CSS transform. From 1601a0808942c320424a3d1f4afb6dd207143ca7 Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Thu, 12 Nov 2020 14:40:05 +0100 Subject: [PATCH 3/7] Typo --- pages/glossary/disabled-element.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/glossary/disabled-element.md b/pages/glossary/disabled-element.md index 2d045adc093..983ecf44769 100755 --- a/pages/glossary/disabled-element.md +++ b/pages/glossary/disabled-element.md @@ -17,7 +17,7 @@ An element is _disabled_ when it has been rendered [inoperable][] in one of the [actually disabled]: https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled 'HTML definition of Actually Disabled' [assistive technology]: https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies -[attribute value]: #atttribute-value 'Definition of Attribute Value' +[attribute value]: #attribute-value 'Definition of Attribute Value' [disabled pseudo-class]: https://drafts.csswg.org/selectors/#disabled-pseudo "CSS Selectors Level 4 (Editor's Draft), definition of the :disabled pseudo-class" [inoperable]: https://www.w3.org/TR/wai-aria/#dfn-operable [shadow-including ancestor]: https://dom.spec.whatwg.org/#concept-shadow-including-ancestor From 0a644a3fbdb6ddd4b976890683d82707a6b3bc27 Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Thu, 12 Nov 2020 15:58:03 +0100 Subject: [PATCH 4/7] Improve wording Co-authored-by: Kasper Isager --- pages/glossary/disabled-element.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/glossary/disabled-element.md b/pages/glossary/disabled-element.md index 983ecf44769..d8ddb27efb5 100755 --- a/pages/glossary/disabled-element.md +++ b/pages/glossary/disabled-element.md @@ -9,7 +9,7 @@ input_aspects: An element is _disabled_ when it has been rendered [inoperable][] in one of the following ways: -1. The element matches the [`:disabled` pseudo-class][disabled pseudo-class], for HTML elements, it means that the element is [actually disabled][]. +1. The element matches the [`:disabled` pseudo-class][disabled pseudo-class]. For HTML elements this means that the element is [actually disabled][]. 2. The element has a [shadow-including ancestor][] whose `aria-disabled` [attribute value][] is "true". From 11221be409479a7b320db68f6b0d451ee698246d Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Mon, 16 Nov 2020 11:56:25 +0100 Subject: [PATCH 5/7] Add heading for Assumption --- pages/glossary/disabled-element.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/glossary/disabled-element.md b/pages/glossary/disabled-element.md index d8ddb27efb5..ecd95f6875c 100755 --- a/pages/glossary/disabled-element.md +++ b/pages/glossary/disabled-element.md @@ -13,10 +13,12 @@ An element is _disabled_ when it has been rendered [inoperable][] in one of the 2. The element has a [shadow-including ancestor][] whose `aria-disabled` [attribute value][] is "true". - **Note:** When the `aria-disabled` attribute is specified on an element, it is assumed that the element has also been disabled for users that do not rely on [assistive technology][]. For example, this can be done by disabling pointer events using the `pointer-events` property and by disabling keyboard interactions using the `tabindex` attribute. +#### Assumptions + +This definition assumes that when the `aria-disabled` attribute is specified on an element, this element has also been disabled for users that do not rely on [assistive technology][]. For example, this can be done by disabling pointer events using the `pointer-events` property and by disabling keyboard interactions using the `tabindex` attribute. If this is not the case, the definition will produce incorrec results. [actually disabled]: https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled 'HTML definition of Actually Disabled' -[assistive technology]: https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies +[assistive technology]: https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies 'WCAG definition of Assistive Technologies' [attribute value]: #attribute-value 'Definition of Attribute Value' [disabled pseudo-class]: https://drafts.csswg.org/selectors/#disabled-pseudo "CSS Selectors Level 4 (Editor's Draft), definition of the :disabled pseudo-class" [inoperable]: https://www.w3.org/TR/wai-aria/#dfn-operable From e1c9c10bace8c808e2630ead4201d7bfea72a877 Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Mon, 16 Nov 2020 11:56:38 +0100 Subject: [PATCH 6/7] Correct copy/paste of Assumption --- _rules/text-contrast-afw4f7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_rules/text-contrast-afw4f7.md b/_rules/text-contrast-afw4f7.md index 46d5078e846..c27ab166652 100755 --- a/_rules/text-contrast-afw4f7.md +++ b/_rules/text-contrast-afw4f7.md @@ -46,7 +46,7 @@ For each test target, the [highest possible contrast][] between the [foreground - Text that has the same foreground and background color (a contrast ratio of 1:1) is not considered to be "visual presentation of text", making it inapplicable to the success criterion. Text hidden in this way can still cause accessibility issues under other success criteria, depending on the content. -- The definition of [disabled element][disabled] assumes that the presence of the `aria-disabled` attribute is matched by similar techniques for users not relying on assistive technologies. If this is not the case, that definition may produce incorrect results and in consequence this rule might be Inapplicable to some text nodes that still require a good contrast ratio. +- The definition of [disabled element][disabled] assumes that when the `aria-disabled` attribute is specified on an element, this element has also been disabled for users that do not rely on [assistive technology][]. If this is not the case, that definition may produce incorrect results and in consequence this rule might be Inapplicable to some text nodes that still require a good contrast ratio. ## Accessibility Support @@ -382,6 +382,7 @@ This text is part of a label of a [disabled][] widget, because it is in a `label [accessible name]: #accessible-name 'Definition of Accessible Name' [ancestor]: https://dom.spec.whatwg.org/#concept-shadow-including-ancestor 'DOM, ancestor, 2020/07/23' +[assistive technology]: https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies 'WCAG definition of Assistive Technologies' [background colors]: #background-colors-of-text 'Definition of Background color of text' [child]: https://dom.spec.whatwg.org/#concept-tree-child 'DOM, child, 2020/07/23' [disabled]: #disabled-element 'Definition of Disabled' From 660360dd74f135c1e15327342b86e4ae1e3d3f0c Mon Sep 17 00:00:00 2001 From: Jean-Yves Moyen Date: Mon, 16 Nov 2020 12:12:50 +0100 Subject: [PATCH 7/7] Typo --- pages/glossary/disabled-element.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/glossary/disabled-element.md b/pages/glossary/disabled-element.md index ecd95f6875c..d1dfdfd09ae 100755 --- a/pages/glossary/disabled-element.md +++ b/pages/glossary/disabled-element.md @@ -15,7 +15,7 @@ An element is _disabled_ when it has been rendered [inoperable][] in one of the #### Assumptions -This definition assumes that when the `aria-disabled` attribute is specified on an element, this element has also been disabled for users that do not rely on [assistive technology][]. For example, this can be done by disabling pointer events using the `pointer-events` property and by disabling keyboard interactions using the `tabindex` attribute. If this is not the case, the definition will produce incorrec results. +This definition assumes that when the `aria-disabled` attribute is specified on an element, this element has also been disabled for users that do not rely on [assistive technology][]. For example, this can be done by disabling pointer events using the `pointer-events` property and by disabling keyboard interactions using the `tabindex` attribute. If this is not the case, the definition will produce incorrect results. [actually disabled]: https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled 'HTML definition of Actually Disabled' [assistive technology]: https://www.w3.org/TR/WCAG21/#dfn-assistive-technologies 'WCAG definition of Assistive Technologies'