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

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