[whatwg] default select item that does not satisfy required attr.

Ric Hardacre wrote:
> from the web forms doc in the comment at the bottom:
> 
>   * have a way of marking the first option of a <select> as the default
>     but have it not satisfy a new required="" attribute on <select> so
>     that you can have selects that require a valid value.

How about just a new element (or even a current element) that can be put 
inside <select> but isn't <option>? That would make most sense 
semantically, since it would be something in the select that wasn't an 
option. What do current UAs do with known non-option elements and 
unknown elements in <select>?

Alternatively, if that doesn't work, why not hack it with <option 
disabled selected> ? That works fine on Firefox trunk, at least, haven't 
checked other browsers. It can even be styled to appear how you want it. 
  It's not optimal semantically (as that's not really an "option"), but 
it's no worse than HTML 4 (actually, it *is* HTML 4).

-- 
dolphinling
<http://dolphinling.net/>

Received on Friday, 24 February 2006 07:07:22 UTC