W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] <summary> and <details> elements' specification

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Mon, 11 Apr 2011 18:22:27 -0400
Message-ID: <BANLkTikzVb97vCFf5eReJmJVjHS=jey8Uw@mail.gmail.com>
On Mon, Apr 11, 2011 at 11:58 AM, Jukka K. Korpela <jkorpela at cs.tut.fi> wrote:
> Not necessarily. The for="..." attribute could be made optional, so that the
> default association is to associate the <summary> attribute with the next
> sibling element.
>
> (I wonder why the association between <label> elements and input fields has
> not been defined this way. It's too late now, but things aren't too late for
> <details>.)

If <label> has no "for" attribute, it labels its first labelable
descendant.  E.g.,

    <label>Name: <input></label>

means the same as

    <label for=name>Name: <input id=name></label>

http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-label-element
Received on Monday, 11 April 2011 15:22:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT