This document provides information about the related Acquia Optimize checks:
The autocomplete attribute on HTML input
, select
, and textarea
elements must have a valid value.
When the autocomplete attribute on HTML input
, select
, and textarea
elements have a valid value, forms are easier to use and access. Users can enter data faster and with fewer mistakes, especially for repeated information like names or email addresses. For users who use assistive technologies, a valid autocomplete value helps the technology to understand the form fields correctly. Without valid values, users may become confused, experience delays, or make mistakes when they fill out forms.
Sandra is 38 years old. At the age of 16, her life took an unexpected turn during a sports accident on the basketball court. While attempting a daring dunk, she landed in an awkward manner, resulting in a spinal cord injury. Unfortunately, this event left her paralyzed from the waist down.
"I always use my dictation software whenever I can. It’s just so much easier on me—I don’t have to deal with the pain from moving the mouse around. And those forms that auto-fill your information? Absolute lifesavers. The computer already knows my name and all kinds of other details about me, so why not let it do the work? It makes things so much simpler for me!"
This section provides some examples of the issue.
A login form includes a username field coded as:
<label for="username">Username<input id="username" autocomplete="username"/></label>
In this example “username” is a valid value.
This makes it easy for users to understand the expected input type and to receive relevant autocomplete suggestions.
A login form includes a username field coded as:
<label for="username">Username<input id="username" autocomplete="badname"/></label>
In this example, autocomplete="badname"
is not a valid value. This prevents users from receiving relevant autocomplete suggestions, which makes it harder to input the correct data efficiently.
How to fix it.
The Acquia Optimize platform highlights HTML input
, select
, and textarea
elements with an autocomplete attribute value that is invalid.
To fix this:
Replace the invalid value with a valid autocomplete attribute value, such as "username
", "email
", or "off
", as defined by the HTML Living Standard. This ensures proper functionality and provides users with relevant autocomplete suggestions.
Related accessibility conformance testing rules.
Autocomplete attribute has valid value
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Jan 15 2025 12:33:18 GMT+0000 (Coordinated Universal Time)