This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12522 - Autocomplete attribute not allowed on checkboxes in HTML5?
Summary: Autocomplete attribute not allowed on checkboxes in HTML5?
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-18 18:58 UTC by geoffreyk
Modified: 2015-08-23 07:07 UTC (History)
0 users

See Also:


Attachments

Description geoffreyk 2011-04-18 18:58:38 UTC
Using direct input, use this simple html page
<!DOCTYPE html>
<html>
<head>
<title>checkbox autocomplete test</title>
</head>
<body>
<input autocomplete="off">
<input type="text" autocomplete="off">
<input type="checkbox" autocomplete="off">
</body>
</html>

Note that a validation error is thrown only for the checkbox. I can find no prohibitions against this attribute for checkboxes. 
Validator error?
Comment 1 Michael[tm] Smith 2011-04-24 14:31:11 UTC
Hi,

Not a validator error. The spec does not allow the autocomplete attribute in input elements in the checkbox state; see the following section:

http://dev.w3.org/html5/spec-author-view/number-state.html#checkbox-state

In that section, there's a "Bookeeping details" subsection, and in that it says:

"The following content attributes must not be specified and do not apply to the element: accept, alt, autocomplete, dirname,..."

Also, see the table here:

http://dev.w3.org/html5/spec-author-view/the-input-element.html#input-type-attr-summary

Note the in the row for the "autocomplete" attribute, the column for "Checkbox, radio button" does not say "Yes".

So the validator is correctly reporting an error in this case.
Comment 2 Michael[tm] Smith 2011-04-24 14:31:11 UTC
Hi,

Not a validator error. The spec does not allow the autocomplete attribute in input elements in the checkbox state; see the following section:

http://dev.w3.org/html5/spec-author-view/number-state.html#checkbox-state

In that section, there's a "Bookeeping details" subsection, and in that it says:

"The following content attributes must not be specified and do not apply to the element: accept, alt, autocomplete, dirname,..."

Also, see the table here:

http://dev.w3.org/html5/spec-author-view/the-input-element.html#input-type-attr-summary

Note the in the row for the "autocomplete" attribute, the column for "Checkbox, radio button" does not say "Yes".

So the validator is correctly reporting an error in this case.