[whatwg] [html5] r5399 - [giow] (2) Define option.selected; make <option disabled selected> still get sel [...]

On Tue, 07 Dec 2010 23:13:13 +0100, Ian Hickson <ian at hixie.ch> wrote:

> On Tue, 31 Aug 2010, Simon Pieters wrote:
>>
>> Maybe <select required><option value selected disabled>Choose one...
>> should be allowed?
>
> I considered that, but since disabled options don't get selected, that
> wouldn't work without yet more special-casing.

It gets selected in Opera, Firefox and WebKit. AFAICT the spec makes it  
selected, too ("selectedness" is true if selected="" is present regardless  
of disabled="").


>> The spec allows <select required><option value>Choose one...<option
>> selected>Foo. Maybe it should require the label option to be selected by
>> default (either implicitly or explicitly) when the select has required?
>
> No, otherwise there'd be no way to just select the current value without
> removing the label.

Yeah.


>> The spec currently doesn't require there to be any select label option
>> if the required attribute is present on select.
>
> Right, the label doesn't have to be present. Why would we require one?

Because without one the required attribute has no effect, so is likely an  
authoring mistake.


Also, s/selected element's/select element's/

-- 
Simon Pieters
Opera Software

Received on Wednesday, 8 December 2010 01:09:13 UTC