Skip to content

Commit 4b80053

Browse files
giacomo-petriJym77
andauthored
[73f2c2] Autocomplete invalid - Accessibility note clarifies HTML spec's disallowed autocomplete values for specific form controls (#2161)
* solving discussion in 1967 Added accessibility support note and removed "ambiguous example" * Update autocomplete-valid-value-73f2c2.md Replaced "Certain `autocomplete` attribute values are appropriate only for specific form controls. However, despite some combinations of `autocomplete` attribute values and form controls not being allowed by HTML specifications, the input purpose is programmatically available, and autocomplete functions correctly. Thus, if the input possesses the suitable autocomplete value, it fulfills the [Success Criterion 1.3.5 Identify Input Purpose](https://www.w3.org/TR/WCAG22/#identify-input-purpose), regardless of the input type." with "Authors may assign inappropriate `autocomplete` attribute values. Moreover, HTML specifications restrict certain `autocomplete` attribute values to specific form controls. Mismatches between `autocomplete` attribute values and form control types may or may not lead to a failure of [Success Criterion 1.3.5 Identify Input Purpose](https://www.w3.org/TR/WCAG22/#identify-input-purpose). However, this rule focuses exclusively on validating valid `autocomplete` attribute values, disregarding their contextual appropriateness." --------- Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
1 parent 24a9bcd commit 4b80053

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

_rules/autocomplete-valid-value-73f2c2.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The purpose of a control is programmatically identifiable even when its `autocom
5858
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have a [semantic role][] of `none` and fail this rule with some technology but users of other technologies would not experience any accessibility issue.
5959
- Some user agents treat the value of the `aria-disabled` attribute as case-sensitive.
6060
- In some user agents, querying the value of the `autocomplete` property returns an empty string ("") even when the attribute was set according to the rule's expectations. It affects assistive technologies which rely on this property to personalize input fields collecting information about the user.
61+
- Authors may assign inappropriate `autocomplete` attribute values. Moreover, HTML specifications restrict certain `autocomplete` attribute values to specific form controls. Mismatches between `autocomplete` attribute values and form control types may or may not lead to a failure of [Success Criterion 1.3.5 Identify Input Purpose](https://www.w3.org/TR/WCAG22/#identify-input-purpose). However, this rule focuses exclusively on validating valid `autocomplete` attribute values, disregarding their contextual appropriateness.
6162

6263
## Background
6364

@@ -147,14 +148,6 @@ This `autocomplete` [attribute value][] list includes all allowed types of token
147148

148149
#### Passed Example 8
149150

150-
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".
151-
152-
```html
153-
<label>Birthday day<input name="bdayday" type="tel" autocomplete="bday-day"/></label>
154-
```
155-
156-
#### Passed Example 9
157-
158151
This `autocomplete` [attribute value][] has the required token "current-password", followed by the optional "webauthn" token.
159152

160153
```html

0 commit comments

Comments
 (0)