[whatwg] The examples of the list attribute of the input element is incorrect
ian at hixie.ch
Fri Feb 12 04:28:31 PST 2010
On Wed, 6 Jan 2010, Futomi Hatano wrote:
> There is a example which shows how to mark up fallback contents of the
> datalist element.
> Enter a breed:
> <input type="text" name="breed" list="breeds">
> <datalist id="breeds">
> or select one from the list:
> <select name="breed">
> <option value=""> (none selected)
> <!-- ... -->
> I think that this example is incorrect. [...] But it does not work in
> UAs which support the datalist element as expected (i.e. the suggests
> are not shown.), because the option elements do not have a value
> The spec says that a value attribute is required in the option element
> for a suggestion.
It doesn't say they have to have a value _attribute_, it says it has to
have a value. "Value" in this context is defined:
...as "The value of an option element is the value of the value attribute,
if there is one, or the textContent of the element, if there isn't".
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg