W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2013

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

From: <bugzilla@jessica.w3.org>
Date: Mon, 05 Aug 2013 15:05:04 +0000
To: www-validator-cvs@w3.org
Message-ID: <bug-22802-169-ZMPP0KwTZx@http.www.w3.org/Bugs/Public/>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:55 UTC