O with occluded right edge to appear also as a C Open Web Components Guides Docs Blog Toggle darkmode

EsLint Plugin Lit A11y: autocomplete-valid

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

Rule Details

This rule aims to...

Examples of incorrect code for this rule:

html` <input type="text" autocomplete="foo" /> `;
html` <input type="date" autocomplete="email" />; `;

Examples of correct code for this rule:

html` <input type="text" autocomplete="name" /> `;
html` <input type="text" autocomplete=${autocompl} /> `;
html` <input type="text" autocomplete="section-somewhere shipping work email" />; `;

Further Reading