W3C home > Mailing lists > Public > www-validator@w3.org > August 2016

Re: Error in Validator or Specification ?

From: Michael[tm] Smith <mike@w3.org>
Date: Mon, 22 Aug 2016 14:44:30 +0900
To: Heimetli Software AG <validator@heimetli.ch>
Cc: www-validator@w3.org
Message-ID: <20160822054430.npnhxqsk3zmdheai@sideshowbarker.net>
Heimetli Software AG <validator@heimetli.ch>, 2015-11-09 10:28 +0100:
> Archived-At: <http://www.w3.org/mid/000001d11ad1$05a4aba0$10ee02e0$@heimetli.ch>
> 
> Hello WWW-Validator,
> 
> I copied this fragment of HTML5 from the Specification
> Into a form and fed it to the validator at validator.w3.org:
> 
> <label>
>  Sex:
>  <input name=sex list=sexes>
>  <datalist id=sexes>
>   <option value="Female">
>   <option value="Male">
>  </datalist>
> </label>
> 
> /* First example below http://www.w3.org/TR/html5/forms.html#the-datalist-element */
> 
> And get the following errors
> 
> Error: Element option without attribute label must not be empty.
> >From line 14, column 3; to line 14, column 23
> emale">↩  <option value="Male">↩ </da
> Error: Element option without attribute label must not be empty.
> >From line 15, column 2; to line 15, column 12
> ="Male">↩ </datalist>↩</lab:
> 
> Why does an example from the specification NOT
> pass the validator ??

That example above and the others in the spec do now pass the checker
without errors. The reason they caused errors to be emitted back when you
originally reported this was because at that time the spec still required
all label-less option elements to be non-empty (despite the fact the spec
also had those examples that did not conform to that requirement).

But the spec was in the mean updated (in March) to allow empty label-less
option elements if they are children of datalist elements:

  https://github.com/whatwg/html/commit/3885f11503431c1bb33c3bb4bf1b9d5d9bcdae61

So I also updated the HTML checker back in March to stop emitting errors
for that case.

  —Mike

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Monday, 22 August 2016 05:45:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 22 August 2016 05:45:09 UTC