Re: erroneous datalist error

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