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

Re: erroneous datalist error

From: Prune Master <prunemaster@hotmail.com>
Date: Mon, 18 Apr 2016 13:11:52 -0400
Message-ID: <SNT149-DS7C5CAE9ACD30504AE5BFBAF6B0@phx.gbl>
To: "David Dorward" <david@dorward.me.uk>
CC: <www-validator@w3.org>


If the element has no label attribute: Text that is not inter-element whitespace


Text

http://www.w3.org/TR/html5/dom.html#text-content


Text, in the context of content models, means either nothing, or Text nodes. Text is sometimes used as a content model on its own, but is also phrasing content, and can be inter-element whitespace (if the Text nodes are empty or contain just space characters).




-----Original Message----- 
From: David Dorward 
Sent: Monday, April 18, 2016 6:24 AM 
To: Prune Master 
Cc: www-validator@w3.org 
Subject: Re: erroneous datalist error 

On 15 Apr 2016, at 19:37, Prune Master wrote:

> Validator reports:  "Element option without attribute label must not be empty."
>
> Where does this quoted error text even come from?
>
> I do not see any such prohibition in the HTML5 option element content model spec.

I do.

>> If the element has a label attribute and a value attribute: Empty.

So it has a label, so it isn't that case.

>> If the element has a label attribute but no value attribute: Text.

Also has a label, so it isn't that case

>> If the element has no label attribute: Text that is not inter-element whitespace.

Here we are. No label. Check. Content must be "Text that is not inter-element whitespace", which means "must not be empty".


-- 
David Dorward
http://dorward.co.uk/
Received on Monday, 18 April 2016 17:12:26 UTC

This archive was generated by hypermail 2.3.1 : Friday, 29 April 2016 17:12:41 UTC