W3C home > Mailing lists > Public > public-html@w3.org > March 2012

Re: Option element in a Datalist with no label

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 15 Mar 2012 11:03:50 -0400
Message-ID: <4F6204D6.9030206@mit.edu>
To: public-html@w3.org
On 3/14/12 10:24 PM, Sharon Newman (COHEN) wrote:
> With the following code:
> <input list=test type=text>
> <datalist id=test>
> <option value=a>
> <option value = b>
> <option value=c>
> </datalist>
>
> According to the spec, these options dont have a label, however, in FF
> and Opera today the value is being displayed as the label.

"Displayed as the label" in which sense?

If you're looking at the actual behavior when typing in the input, the 
relevant spec section is 
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-list 
which says:

   The user agent may use the suggestion's label to identify the
   suggestion if appropriate.

There's nothing past that in the spec that really talks about how the 
suggestions should be exposed to the user, as far as I can see. 
Specifically, nothing requires the UA to actually present to 
suggestions, and nothing requires the UA to use the suggestion labels to 
identify the suggestions.  Unless I'm missing something, of course.

-Boris
Received on Thursday, 15 March 2012 15:04:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:47 GMT