diff --git a/_rules/autocomplete-valid-value-73f2c2.md b/_rules/autocomplete-valid-value-73f2c2.md index c87ee345135..3c5bd720ff6 100755 --- a/_rules/autocomplete-valid-value-73f2c2.md +++ b/_rules/autocomplete-valid-value-73f2c2.md @@ -23,9 +23,10 @@ acknowledgments: This rule applies to any HTML `input`, `select` and `textarea` element with an `autocomplete` [attribute value][] that is neither empty (`""`) nor only [ASCII whitespace][], except if one of the following is true: +- **autofill expectation**: the `autocomplete` attribute consists of a single token that is [ASCII case-insensitive][] match for string `off` or string `on`; or - **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 +- **fixed value**: the element is an `input` element with a `type` [attribute value][] of `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][]. ## Expectation 1 @@ -37,19 +38,15 @@ Each test target's `autocomplete` [attribute value][] is a [space separated][] l 3. An optional token of either "home", "work", "mobile", "fax" or "pager", only if the last token is "email", "impp", "tel" or "tel-\*"; then 4. A required token from the [correct autocomplete field][]. -## 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. - ## 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. -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. +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 and require a valid `autocomplete` attribute to satisfy success Criterion [1.3.5 Identify Input Purpose][sc135]. -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]. +Mainstream user agents tend to provide autofill suggestions for `input` elements with or without an [appropriate field name for the form control][]. As such, the assistive technologies should be able recognize the purpose of a control even when the `autocomplete` [attribute value][] is inappropriate for the control's `type` [attribute value][]. ## Accessibility Support @@ -74,7 +71,7 @@ The auto-completing feature of the `autocomplete` attribute benefits many users, #### Passed Example 1 -This `autocomplete` [attribute value][] only has the required token, and is valid for an `input` element which has a default type of `text`. +This `autocomplete` [attribute value][] only has the required token "username". ```html @@ -82,7 +79,7 @@ This `autocomplete` [attribute value][] only has the required token, and is vali #### Passed Example 2 -This `autocomplete` [attribute value][] only has the required token, and is valid for a `select` element. Even though the element's [form owner](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-owner) has `autocomplete="off"`, thus preventing the user agent from completing it, it does not prevent the `autocomplete` [attribute value][] from being programmatically identifiable. +The `autocomplete` [attribute value][] only of the `select` element has the required token "bday-month". Even though the element's [form owner](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-owner) has `autocomplete="off"`, thus preventing the user agent from completing it, it does not prevent the `autocomplete` [attribute value][] from being programmatically identifiable. ```html
@@ -98,7 +95,7 @@ This `autocomplete` [attribute value][] only has the required token, and is vali #### Passed Example 3 -This `autocomplete` [attribute value][] only has the required token, and is valid for a `textarea` element. Mixing upper and lower case letters is allowed for `autocomplete` attributes. +This `autocomplete` [attribute value][] only has the required token "street-address". Mixing upper and lower case letters is allowed for `autocomplete` attributes. ```html @@ -106,7 +103,7 @@ This `autocomplete` [attribute value][] only has the required token, and is vali #### Passed Example 4 -This `autocomplete` [attribute value][] list includes a `work` token, allowed because it is used before `email`. The `email` token is allowed on `input` elements with a `type` [attribute value][] of `text`. +This `autocomplete` [attribute value][] list includes a `work` token, allowed because it is used before `email`. ```html @@ -114,7 +111,7 @@ This `autocomplete` [attribute value][] list includes a `work` token, allowed be #### Passed Example 5 -This `autocomplete` [attribute value][] list includes a `section-` token, which can preface any [correct autocomplete field][]. The `email` token is allowed on `input` elements with a `type` [attribute value][] of `text`. +This `autocomplete` [attribute value][] list includes a `section-` token, which can preface any [correct autocomplete field][]. ```html @@ -130,12 +127,20 @@ This `autocomplete` [attribute value][] list includes `section-` and `billing` t #### Passed Example 7 -This `autocomplete` [attribute value][] list includes all allowed types of tokens in the correct order. The `email` token is allowed on `input` elements with a `type` [attribute value][] of `text`. +This `autocomplete` [attribute value][] list includes all allowed types of tokens in the correct order. ```html ``` +#### Passed Example 8 + +This `autocomplete` [attribute value][] only has the required token "bday-day". It remains programmatically identifiable even though it is inappropriate for the control's `type` [attribute value][] "tel". + +```html + +``` + ### Failed #### Failed Example 1 @@ -148,7 +153,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 which is a [correct autocomplete field][]. However, `work` can not be used with `photo`. ```html @@ -190,21 +195,13 @@ The `autocomplete` attribute value is on an `input` element that does not have a #### Inapplicable Example 1 -This `button` element does not support `autocomplete` attributes. - -```html - -``` - -#### Inapplicable Example 2 - This `autocomplete` [attribute value][] is empty (""). ```html ``` -#### Inapplicable Example 3 +#### Inapplicable Example 2 This `autocomplete` [attribute value][] contains only [ASCII whitespace][]. @@ -212,7 +209,7 @@ This `autocomplete` [attribute value][] contains only [ASCII whitespace][]. ``` -#### Inapplicable Example 4 +#### Inapplicable Example 3 This `autocomplete` [attribute value][] is on an element that is not [visible][] through `display:none`. @@ -220,15 +217,7 @@ This `autocomplete` [attribute value][] is on an element that is not [visible][] ``` -#### Inapplicable Example 5 - -This `autocomplete` attribute is on an `input` element with a `type` [attribute value][] that does not support autocomplete. - -```html - -``` - -#### Inapplicable Example 6 +#### Inapplicable Example 4 This `autocomplete` attribute is on an `input` element that has the `disabled` attribute. @@ -236,7 +225,7 @@ This `autocomplete` attribute is on an `input` element that has the `disabled` a ``` -#### Inapplicable Example 7 +#### Inapplicable Example 5 This `autocomplete` attribute is on an `input` element that has the `aria-disabled` [attribute value][] of `true`. @@ -244,7 +233,7 @@ This `autocomplete` attribute is on an `input` element that has the `aria-disabl ``` -#### Inapplicable Example 8 +#### Inapplicable Example 6 This `autocomplete` attribute is ignored because it is on an element with a [semantic role][] of `none`. The `disabled` attribute is required to ensure [presentational roles conflict resolution][] does not cause the `none` role to be ignored. @@ -252,9 +241,18 @@ This `autocomplete` attribute is ignored because it is on an element with a [sem ``` +#### Inapplicable Example 7 + +This `autocomplete` attribute is inapplicable because it has the `off` value. + +```html + +``` + [ascii whitespace]: https://infra.spec.whatwg.org/#ascii-whitespace 'HTML ASCII whitespace 2020/08/12' +[ascii case-insensitive]: https://infra.spec.whatwg.org/#ascii-case-insensitive 'definition of ASCII case-insensitive' [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' +[appropriate field name for the form control]: #appropriate-field-for-the-form-control 'Definition of Appropriate field for the form control' [correct autocomplete field]: #correct-autocomplete-field 'Definition of Correct autocomplete field' [disabled element]: #disabled-element 'Definition of Disabled Element' [html specification for autofill detail tokens]: https://html.spec.whatwg.org/#autofill-detail-tokens 'HTML Autofill Detail, 2020/08/12' diff --git a/pages/glossary/rendered-image-resource.md b/pages/glossary/rendered-image-resource.md index d52ff862c63..92bc58b918c 100755 --- a/pages/glossary/rendered-image-resource.md +++ b/pages/glossary/rendered-image-resource.md @@ -13,4 +13,4 @@ A _rendered image resource_ in a [web page][] is any resource with [visible pixe [embedded image]: #embedded-image 'Definition of Embedded Image' [image sources]: https://html.spec.whatwg.org/multipage/images.html#image-source [visible pixels]: #visible 'Definition of visible' -[web page]: #web-page-html 'Definition of web page (HTML)' \ No newline at end of file +[web page]: #web-page-html 'Definition of web page (HTML)'