Rule: html-input-require-autocomplete
Require an autocomplete attribute on <input> elements with types that support autocomplete functionality. This rule ensures that developers explicitly declare autocomplete behavior for form inputs.
The HTML autocomplete attribute helps users complete forms by using data stored in the browser. This is particularly useful for people with motor disabilities or cognitive impairment who may have difficulties filling out forms online. Without an explicit autocomplete attribute, behavior varies across browsers and can lead to inconsistent user experiences.
If you prefer not to specify a specific autocomplete value, use autocomplete="on" to enable browser defaults or autocomplete="off" to explicitly disable it.
This rule applies to the following input types:
colordatedatetime-localemailmonthnumberpasswordrangesearchteltexttimeurlweek
<input type="email" autocomplete="email">
<input type="url" autocomplete="off">
<input type="password" autocomplete="on"><input type="email">
<input type="url">
<input type="password">