This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the Element-specific attributes placeholder is listed therefore should not throw an error when validating. Element-specific attributes for element input: Global attributes accept alt autocomplete autofocus checked disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern placeholder readonly required size src step type value width
please provide a test case
I get the same error. You can reproduce it with the following link: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.opinirate.com%2Fkoffie&charset=%28detect+automatically%29&doctype=Inline&group=0
(In reply to comment #2) > I get the same error. > You can reproduce it with the following link: > http://validator.w3.org/check?uri=http%3A%2F%2Fwww.opinirate.com%2Fkoffie&charset=%28detect+automatically%29&doctype=Inline&group=0 You have <input type=hidden placeholder> and <input type=file placeholder> in that document. The HTML5 spec doesn't permit placeholder ond <input type=hidden> or <input type=file> Take a look here: http://dev.w3.org/html5/spec/the-input-element.html#input-type-attr-summary Check the row for "placeholder". The placeholder attribute is only allowed on the input element if the type is one of the following: text search url tel email password
Here is my example. I am not using a file or a hidden field and still it fails validation due to the placeholder attribute. http://www.martinsolution.com/examples/podcast/index.html
(In reply to comment #4) > Here is my example. I am not using a file or a hidden field and still it fails > validation due to the placeholder attribute. > > http://www.martinsolution.com/examples/podcast/index.html That document has <input type=time> The placeholder attribute is only allowed on the input element if the type is one of the following: text search url tel email password See the "placeholder" row in the table here: http://dev.w3.org/html5/spec/the-input-element.html#input-type-attr-summary
Thanks for your reply. It might be an idea to refine the error displayed. I must say it is a bit confusing to first get told "Attribute placeholder not allowed on element input at this point." and then getting a list "Attributes for element input:" ... placeholder ... Thats why it never occurred to me that the input type was actually the problem here.
(In reply to comment #6) > It might be an idea to refine the error displayed. > I must say it is a bit confusing to first get told "Attribute placeholder not > allowed on element input at this point." > and then getting a list "Attributes for element input:" > ... > placeholder > ... Yeah, agreed. The current message that gets emitted is confusing. We have had a bug report open for some time that suggests a way to improve it: http://bugzilla.validator.nu/show_bug.cgi?id=339#c0 But it has not been implemented in the validator yet. I will try to see if I might be able to get it implemented in the next couple of weeks. The basic issue is that the "Attributes for element input:" list included in the error message is a chunk of text that's pulled in programatically from a copy of the HTML5 spec. So what we need to do is have the validator copy over only parts of that list (based on the value of the type attribute of the input element it's reporting the error for) instead of the whole list as-is.