W3C home > Mailing lists > Public > public-html@w3.org > May 2009

Outline algorithm and empty sections

From: James Graham <jgraham@opera.com>
Date: Fri, 15 May 2009 15:13:48 +0200
Message-ID: <4A0D6A8C.7010004@opera.com>
To: HTML WG <public-html@w3.org>
I'm not sure if I already posted feedback on this somewhere I couldn't 
find it but apologies if I did.

If the outline algorithm is applied to a document like:

<body>
<section>
<h1>Foo</h1>
</section>
</body>

It produces an empty heading for the <body> section and a subsection of 
<body> named Foo.

Similarly, if the author does something like

<article>
<h1>This is my post</h1>
<section>
<p>This is the main text</p>
</section>
</article>

then they will end up with the text in an untitled subsection of the 
article, even though that is not what they intended.

I think the above patterns are rather common with existing <div>-based 
content and the outline algorithm will be more robust if we deal with 
them gracefully. It seems like it is sufficient to ignore sections with 
no explicit heading when computing the outline; this does not imply any 
loss of expressiveness since one can always add an empty heading element 
to explicitly express an intention to have a blank heading for a section.
Received on Friday, 15 May 2009 13:11:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:37 GMT