Re: Fieldset disabled attribute and descendants

On Wed, 13 Jan 2010, Adrian Bateman wrote:
>
> http://dev.w3.org/html5/spec/Overview.html#the-fieldset-element
> 
> In the description for the <fieldset> disabled attribute, the spec says:
> 
> "The disabled attribute, when specified, causes all the form control 
> descendants of the fieldset element, excluding those that are 
> descendants of the fieldset element's first legend element child, if 
> any, to be disabled."
> 
> Is there a reason why the disabled attribute shouldn't also disable 
> controls that are descendants of the first legend element?

Generally speaking, the main use case for this is a checkbox in the legend 
used to enable or disable the entire fieldset.

For example:

 +-- [ ] Shipping address is different from billing address --------+
 |                                                                  |
 | (form fields for shipping address)                               |
 |                                                                  |
 +------------------------------------------------------------------+

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 13 January 2010 22:32:04 UTC