Skip to content

Commit

Permalink
[73f2c2] Autocomplete invalid - Accessibility note clarifies HTML spe…
Browse files Browse the repository at this point in the history
…c'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>
  • Loading branch information
giacomo-petri and Jym77 committed Jun 10, 2024
1 parent 24a9bcd commit 4b80053
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions _rules/autocomplete-valid-value-73f2c2.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The purpose of a control is programmatically identifiable even when its `autocom
- 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.
- Some user agents treat the value of the `aria-disabled` attribute as case-sensitive.
- 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.
- 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.

## Background

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

#### 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
<label>Birthday day<input name="bdayday" type="tel" autocomplete="bday-day"/></label>
```

#### Passed Example 9

This `autocomplete` [attribute value][] has the required token "current-password", followed by the optional "webauthn" token.

```html
Expand Down

0 comments on commit 4b80053

Please sign in to comment.