Failure of Success Criterion 1.3.5 due to incorrect autocomplete attribute values

Important Information about Techniques

See Understanding Techniques for WCAG Success Criteria for important information about the usage of these informative techniques and how they relate to the normative WCAG 2.1 success criteria. The Applicability section explains the scope of the technique, and the presence of techniques for a specific technology does not imply that the technology can be used in all situations to create content that meets WCAG 2.1.

Applicability

This technique applies to form inputs created in HTML which collect information about the user of the form.

This technique relates to Success Criterion 1.3.5: Identify Input Purpose (Failure).

Description

The purpose of this technique is to identify a failure condition where form inputs do not have the correct autocomplete attribute values for inputs that request information about the user of the form.

Success Criteria 1.3.5 uses a fixed list of tokens in Input Purposes for User Interface Components (based on the HTML 5.2 autocomplete attribute’s fixed list of token values) because the programmatic association of specified token values (metadata) allows for other machine processing, such as expressing the input label in different modalities.

Another important part of this Success Criterion is that the token values are associated with inputs that are scoped directly to the primary end user.

Examples

Example 1: Incorrect attribute

An online form used to collect the user's name and birthday which uses incorrect autocomplete attributes. The correct attribute value for the first control is name and for the second control the made-up attribute value birthday was used instead of bday for this example.

<h2>Your details:</h2>
<label for="name1">Name:</label>
<input type="text" name="field1a" autocomplete="email" id="name1"> 
<label for="birthday1">Birthday:</label>
<input type="text" name="field1b" autocomplete="birthday" id="birthday1>

Resources

Resources are for information purposes only, no endorsement implied.

Tests

Procedure

For each form field which collects information about the user of the form:

  1. Check that the form field has an autocomplete attribute and value pair that does not match the purpose of the input.
  2. Check that the input purpose is not communicated programmatically through any other method.

Expected Results

  • If checks #1-2 are true, then the failure condition applies, and the content fails the Success Criterion.