Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inapplicable Example 1 and 2 in Autocomplete attribute has valid value rule are problematic #2235

Open
giacomo-petri opened this issue Jan 26, 2025 · 0 comments

Comments

@giacomo-petri
Copy link
Collaborator

In Autocomplete attribute has valid value" rule

Inapplicable Example 1: <label>Username<input autocomplete=""/></label>

and

Inapplicable Example 2: <label>Username<input autocomplete=" "/></label>

IMO should be removed.


According to the ACT Implementations page

all examples have the expected outcome. (I.e. passed and inapplicable examples should not be failed, and failed examples should not be passed or inapplicable), and...

However, these specific inapplicable examples are problematic and do NOT meet the requirements of SC 1.3.5 Identify Input Purpose. These examples use an input field labeled "Username" to collect user information, and they fail to meet the intent of 1.3.5 for the following reasons:

  • the attribute autocomplete=" " and autocomplete="" are invalid and do not map to any correct value. Since "Username" is clearly a user information field, it falls within the scope of SC 1.3.5. Therefore, the autocomplete attribute should contain a value ("username") to meet this requirement.
  • one of the goals of SC 1.3.5 is to enable technologies to communicate the purpose of input fields to users in alternative ways. For instance, this might involve displaying an icon or visual cue near the input to improve usability and understanding. By omitting a valid autocomplete value, the example fails to achieve this purpose.

A possible approach would have been to replace the label with one that does not collect information about the user. However, the rule currently assumes:

The autocomplete attribute is used on form fields that correspond to Input Purposes for User Interface Components and collect information about the user.

Given this assumption, the examples fall under SC 1.3.5 and fail to align with its requirements. While these examples might technically fit within the rule’s stated exclusions, since the rule excludes empty or only ASCII whitespace values, they create practical issues that undermine the rule's integrity and its mapping to WCAG standards.

IMO we cannot expect tools or testers (especially during manual verification) to refrain from marking these as WCAG violations. To me these examples should be removed entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant