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

Jukka K. Korpela jkorpela at cs.tut.fi
Mon Apr 11 08:58:57 PDT 2011


James Graham wrote:

>> <summary for="detailsId">This is summary. Click to show/close
>> details.</summary>
>> <div id="detailsId" hidden>...</div>
>
> That seems much harder for authors.

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>.)

> the possibility of having multiple elements between the disclosure
> element and the thing it discloses seems unnecessary.

Does it? One might say the same about <label> and input fields, but people 
want to put them into tables, and the same might apply to <summary> and 
<details>.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 




More information about the whatwg mailing list