Fix autocomplete-valid axe errors
A personal-data field uses an invalid or unsuitable autocomplete token, preventing browsers and assistive tools from identifying its purpose reliably.
Кого затрагивает
People with cognitive or motor disabilities, users of password managers, and anyone relying on browser autofill.
Связь с WCAG
1.3.5 Identify Input Purpose (AA)
Обнаружение
wcagc validates autocomplete token order and values on fields whose purpose maps to the WCAG input-purpose taxonomy.
Почему возникает эта ошибка
- A descriptive phrase is used instead of a standard token such as email or postal-code.
- Token order is invalid when section, shipping or billing qualifiers are combined.
- Autocomplete is copied from a different field type.
Проблемная разметка
<label for="email">Email</label><input id="email" autocomplete="email-address">Исправленный код
<label for="email">Email</label><input id="email" type="email" autocomplete="email">Проверьте исправление вручную
Test the form with browser autofill and a password manager. Confirm that the suggested value belongs to the correct person, address and field and that autofill does not overwrite unrelated data.
Границы автоматизации
A valid token does not guarantee that every browser or password manager will offer the desired value, and automation cannot judge whether the field actually requests that purpose.
Источники и стандарты
Метаданные правила и ссылка Deque генерируются из axe-core 4.12.1. Ссылка W3C ведёт на нормативное руководство WCAG для соответствующего критерия.
Вопросы разработчиков
Is autocomplete=off a valid fix?
Not usually for common personal-data fields. Use the correct purpose token unless there is a specific, justified reason that autofill would be unsafe or misleading.
Does autocomplete replace a label?
No. The field still needs a visible programmatic label. Autocomplete supplies machine-readable purpose in addition to that name.
Одно нарушение редко встречается в одиночку
Запустите проверку страницы в wcagc, чтобы найти это правило, связанные проблемы WCAG, затронутые селекторы и пункты, требующие ручной оценки.
Проверить страницу