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

Re: [VE] [html5] spurious "must have child option" when all options in optgroups

From: Philip Taylor <P.Taylor@Rhul.Ac.Uk>
Date: Wed, 16 Apr 2014 15:25:06 +0100
Message-ID: <534E92C2.8050200@Rhul.Ac.Uk>
To: David Dorward <david@dorward.me.uk>
CC: "www-validator@w3.org" <www-validator@w3.org>, Ken Geis <kgeis@berkeley.edu>


David Dorward wrote:

> The error message he quoted was
>
>> Error [html5]: " A select element with a required attribute and
>> without a multiple attribute, and whose size is 1, must have a child
>> option element."
>
> That indicates the validator was in HTML 5 mode, so whatever document
> triggered the error must have triggered HTML 5 mode.

Fair comment.  Unfortunately you did not cite that error message
in your earlier response, and the original had not arrived at that
stage.  Nonetheless ...

(a) We should point out to Mr Geis that reading the HTML 4.01
specification is not always useful when deciding what is or
is not valid in HTML 5, and

(b) Mr Geis specifically quoted "A select element with a /required/
attribute a ...", and this example, which meets that constraint, does
indeed fail as he asserts :

<!DOCTYPE html>
<title>test</title>
<select size=1 required>
<optgroup label=jkldf>
    <option>hello
</optgroup>
</select>

Your earlier example did not have the "required" attribute.

Philip Taylor
Received on Wednesday, 16 April 2014 14:25:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:10 UTC