RE: Fieldset disabled attribute and descendants

On Wednesday, January 13, 2010 2:32 PM, Ian Hickson wrote:
> 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)                               |
>  |                                                                  |
>  +------------------------------------------------------------------+

Thanks Ian (and Philip who suggested the same use case). I think it would be good to include this as an informative example in the spec. We've filed a bug on this behaviour for IE but given the lack of interop on this feature across browsers it might not be a high priority for us.

Cheers,

Adrian.

Received on Monday, 18 January 2010 17:57:03 UTC