[Bug 22802] Validation of the select element and empty options differ from the HTML5 spec

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22802

Michael[tm] Smith <mike@w3.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |mike@w3.org
         Resolution|---                         |WORKSFORME

--- Comment #1 from Michael[tm] Smith <mike@w3.org> ---
(In reply to comment #0)
> When I validate this page:
> 
> http://wet-boew.github.io/wet-boew/demos/formvalid/formvalid-eng.html
> 
> I Get the following error:
> 
> Error: Element option without attribute label must not be empty.

Yeah, that error is correct. The spec says that an empty option element without
an a label attribute is a document-conformance error.

  http://www.w3.org/TR/html51/forms.html#attr-option-label

"The label content attribute, if specified, must not be empty. If the attribute
is not specified, then the element itself must not be empty."

> Here is what the spec says about empty option elements
> (http://www.w3.org/TR/html51/forms.html#placeholder-label-option)
> 
> If a select element has a required attribute specified, does not have a
> multiple attribute specified, and has a display size of 1; and if the value
> of the first option element in the select element's list of options (if any)
> is the empty string, and that option element's parent node is the select
> element (and not an optgroup element), then that option is the select
> element's placeholder label option.

That part of the spec isn't giving document-conformance requirements. It's
instead specifying required user-agent behavior.

> An empty option element should be permitted as the first child of an select
> element.

That's not what that part of the spec is saying.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 5 August 2013 15:05:05 UTC