Skip to content

autocomplete

Ensure the autocomplete attribute is correct and suitable for the form field.

✅ This rule is included in the jsx logical preset.

The autocomplete attribute helps browsers and assistive technologies automatically fill in form fields based on previously entered information. Using correct autocomplete values improves accessibility and user experience by helping users complete forms more quickly and accurately. The HTML specification defines a specific set of valid autocomplete tokens that must be used to ensure proper functionality.

<input type="text" autocomplete="incorrect" />
<input type="email" autocomplete="invalid" />
<input type="text" autocomplete="name invalid" />

This rule is not configurable.

If you’re working on a form that intentionally uses non-standard autocomplete values for specific browser or framework integrations, you may want to disable this rule. However, standard autocomplete values are recommended for better cross-browser compatibility and accessibility.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.