W3C home > Mailing lists > Public > www-validator-cvs@w3.org > April 2015

[Bug 28428] OPTION element in DATALIST element can be empty, but validator say no

From: <bugzilla@jessica.w3.org>
Date: Fri, 10 Apr 2015 18:39:05 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-28428-169-VKBwz8rr9I@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28428

--- Comment #5 from Michael[tm] Smith <mike@w3.org> ---
(In reply to Michael Benjamin from comment #4)
> (In reply to Michael[tm] Smith from comment #3)
> 
> Thank you again for taking the time to respond.
> 
> I mentioned that the spec wasn't clear or definitive because, if what you're
> saying is correct about the language, then the spec very clearly contradicts
> itself. See the first code example here:
> http://www.w3.org/TR/html5/forms.html#the-datalist-element
> 
> In this example, there is no LABEL attribute and no text content in the
> OPTION elements. This code would not pass validation. Yet the W3C
> Recommendation provides this example for instructional purposes.

Yeah, that's a bug in the spec. But it's important to understand that it's a
bug in an informative-only non-normative part of the spec. That's because the
examples don't state any requirements. That particular example could simply be
dropped from the spec completely instead of being fixed, and the spec
requirements would still be the same either way.

> Regarding examples -- from various reputable and reliable sources -- with
> empty OPTION elements, this seems to be the norm across all web tutorials.
> There are no cases I have found where the OPTION element in a DATALIST uses
> text content or the LABEL attribute. This is probably because the spec -- as
> you can see from the link above -- is unclear and possibly misleading.
> 
> I'll consider your advice to file a bug report on this.

FWIW, given that way that datalist works, I think it makes some sense to allow
label-less option elements within datalist to be empty. But I don't feel
strongly enough about it myself to spend any time of my own trying to get it
changed in the spec. If you do feel strongly about it, then I think you should
take the time to raise a bug about it and follow through on it.

If/when the spec does change with regard to this, I guarantee you I would
update the validator relatively quickly to match the spec change.

>  In the meanwhile, I
> hope you'll consider allowing validation to pass for code structured in
> conformance with the examples in the W3 Recommendation. Thank you, again.

Thank you too but there's no way I will consider changing the validator
behavior here unless/until the spec changes. There is no such thing as being
"in conformance with the examples in the W3 Recommendation" or with examples
anywhere else. That's because examples are informative only, so there's no way
for the validator to be in conformance with them. The only thing that the
validator can be in conformance with is the actual requirements in the spec.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 10 April 2015 18:39:06 UTC

This archive was generated by hypermail 2.3.1 : Friday, 10 April 2015 18:39:07 UTC