[whatwg] Allow Headings As Children of <summary>

Hugh Guiney hugh.guiney at gmail.com
Wed Oct 27 19:52:50 PDT 2010

I am authoring a video portfolio page using Kroc Camen's Video For
Everybody code <http://camendesign.com/code/video_for_everybody> for
each piece. In this code he includes a download section for users who
may be unable to play the video live on the site, e.g. because they
lack both HTML5 (or the proper browser codecs) and Flash support. As
this hopefully won't be a problem for most users, I would prefer not
to distract them with this information unless they decide they need
it, and therefore have chosen to mark it up with <details>.

However, I feel this "Download" portion is also important enough to be
its own subsection, as it is distinct from the surrounding content and
may be useful to navigate to as part of the document outline. The
obvious way to accomplish this would be for instance:

<li><a href="video.mp4">MP4</a></li>
<li><a href="video.ogg">OGG</a></li>

but this is invalid via the current spec which only allows <summary>
to contain phrasing content. I could give it its own heading outside
of <details>, but this would be redundant as I would have to do
duplicate the heading text in both <h1> and <summary>, and it makes
the expansion action area ambiguous. A mouse user might encounter the
collapsed menu and not know whether to click on the heading or the
summary to expand it—or even just consider it the author's error, or a

Even if I were to use different text for each element, I find few
things to be appropriate in this context that are not similarly
redundant. "Download" for the heading and "Video Format Options" for
the summary? The fact that the list is of format options would be
reasonably apparent by the link text for each item indicating "MP4",
"OGG", etc.

My proposal to address this would be to allow heading content under
<summary>—or, conversely, to allow <summary> to be used as a
descendant of <details> rather than just the first child, such that
you could wrap headings around it, as phrasing content is already
allowed under <details>. But, the latter changes structure and
therefore parsing whereas the former is simply a validation change.

More information about the whatwg mailing list