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>

Received on Monday, 11 April 2011 15:22:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:05 UTC