From 07bbefebd33f178bf15f1f39db7b6911da4dd705 Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Wed, 17 Feb 2021 17:14:22 +0000 Subject: [PATCH] suggestions from #1540 and #1541 --- _rules/autocomplete-valid-value-73f2c2.md | 24 ++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/_rules/autocomplete-valid-value-73f2c2.md b/_rules/autocomplete-valid-value-73f2c2.md index c87ee345135..62f35635aa4 100755 --- a/_rules/autocomplete-valid-value-73f2c2.md +++ b/_rules/autocomplete-valid-value-73f2c2.md @@ -26,7 +26,8 @@ This rule applies to any HTML `input`, `select` and `textarea` element with an ` - **hidden**: the element is not [visible][], and not [included in the accessibility tree][]; or - **disabled**: the element is a [disabled element]; or - **fixed value**: the element is an `input` element with a `type` [attribute value][] of either `hidden`, `button`, `submit` or `reset`; or -- **static**: the element is not part of [sequential focus navigation][] and has a [semantic role][] that is not a [widget role][]. +- **static**: the element is not part of [sequential focus navigation][] and has a [semantic role][] that is not a [widget role][] +- the `autocomplete` attribute wears the [autofill expectation mantle](https://html.spec.whatwg.org/#autofill-expectation-mantle). ## Expectation 1 @@ -39,15 +40,20 @@ Each test target's `autocomplete` [attribute value][] is a [space separated][] l ## Expectation 2 -Each test target's `autocomplete` [attribute value][] has a [correct autocomplete field][] that is [appropriate][appropriate field for the form control] for that test target. +Each test target's `autocomplete` [attribute value][] has a [correct autocomplete field][] that is [appropriate][appropriate field for the form control] for that its control group. It means that, for example, an `input` element with `autocomplete="new-password"` must have the `type` attribute with one of the following values: + +- `hidden` (in this case the test target is inapplicable), +- `text`, +- `search`, +- `password`. ## Assumptions The `autocomplete` attribute is used on form fields that correspond to [Input Purposes for User Interface Components](https://www.w3.org/TR/WCAG21/#input-purposes) and collect information about the user. -If the `autocomplete` attribute is used to describe "custom" taxonomy, for example ``, success Criterion [1.3.5 Identify Input Purpose][sc135] may be satisfied even if this rule failed. +Controls with the `autocomplete` attribute that wears the [autofill expectation mantle](https://html.spec.whatwg.org/#autofill-expectation-mantle) (e.g. ``) are assumed not to collect information about the user or do not correspond to [Input Purposes for User Interface Components](https://www.w3.org/TR/WCAG21/#input-purposes); therefore, they are inapplicable. -The `type` attribute is used correctly according to the intended purpose of `input` elements. If an incorrect `type` attribute is used for `input` elements, this rule may fail elements that satisfy success Criterion [1.3.5 Identify Input Purpose][sc135]. For example if an `input` element has a `type` of `number`, but is expecting an e-mail address. +If the `autocomplete` attribute is used to describe "custom" taxonomy, for example ``, success Criterion [1.3.5 Identify Input Purpose][sc135] may be satisfied even if this rule failed. The `aria-disabled` state is used on `input` elements which are not part of [sequential focus navigation][] and are not otherwise [operable](https://www.w3.org/TR/wai-aria-1.2/#dfn-operable). If this is not the case, this rule may be inapplicable on elements that are still [operable](https://www.w3.org/TR/wai-aria-1.2/#dfn-operable) and require a valid `autocomplete` attribute to satisfy success Criterion [1.3.5 Identify Input Purpose][sc135]. @@ -148,7 +154,7 @@ This `autocomplete` [attribute value][] has an unknown term that is not a [corre #### Failed Example 2 -This `autocomplete` [attribute value][] has the `work` token on a [correct autocomplete field][], however `work` can not be used with `photo`. +This `autocomplete` [attribute value][] has the `work` token on a [correct autocomplete field][], however, `work` can not be used with `photo`. ```html @@ -252,6 +258,14 @@ This `autocomplete` attribute is ignored because it is on an element with a [sem ``` +#### Inapplicable Example 9 + +This `autocomplete` attribute does not collect information about the user + +```html + +``` + [ascii whitespace]: https://infra.spec.whatwg.org/#ascii-whitespace 'HTML ASCII whitespace 2020/08/12' [attribute value]: #attribute-value 'Definition of Attribute Value' [appropriate field for the form control]: #appropriate-field-for-the-form-control 'Definition of Appropriate field for the form control'