Turn On Autocomplete
Tuesday, September 25th, 2007The following is a possible new chapter to be added to Refactoring HTML in the accessibility section. I’m throwing this in fairly late in the editing process, so I’d appreciate any thoughts, comments, or criticisms you might have about this. In particular, I’d appreciate any cases you can think of where autocomplete is not appropriate.
For what it’s worth, I’ve pretty well convinced myself that usernames and passwords are not such a case. That is, autocompleting usernames and passwords definitely increases accessibility and usually increases security. I don’t intend to explain why it improves security in this chapter, but if anyone wants to disagree with that, I’ll explain why in the comments.
Remove autocomplete=”off” attributes where appropriate.
<form action="/login" method="post" autocomplete="off">
<p><label>E-Mail Address:
<input type="text" name="e1" autocomplete="off"/>
</label></p>
<p><label>Password:
<input type="password" name="p1" />
</label></p>
<input type="submit" title="Login" autocomplete="off"/>
</form>
<form action="/login" method="post" autocomplete="off">
<p><label>E-Mail Address:
<input type="text" name="e1" />
</label></p>
<p><label>Password:
<input type="password" name="p1" />
</label></p>
<input type="submit" title="Register" />
</form>