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

[whatwg] Headings and sections, role of H2-H6

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Thu, 29 Apr 2010 20:08:22 -0400
Message-ID: <r2r7c2a12e21004291708q6a690561g7b9aa1eb4c6e1b83@mail.gmail.com>
On Thu, Apr 29, 2010 at 5:34 AM, Steve Dennis <admin at subcide.com> wrote:
> The other thing to take into consideration is Content Management Systems. ?The <section> model, while technically a much better document model, will be much much harder for things such as rich text editors to implement I would imagine. ?Due to sections often being visually invisible, the nesting of invisible elements can get unmanageable and broken very easily if clients with little understanding of the document model (probably 99% of them) are editing their own content via WYSIWYG a lot. ? The non-nested system of the <h1> - <h6> is much easier due to being single tags with no nesting, and every element being visually distinct.

Yeah, inserting synthetic sections into arbitrary user-submitted
content (WYSIWYG or not) is more or less impossible to do reliably.
This was suggested for MediaWiki
<https://bugzilla.wikimedia.org/show_bug.cgi?id=6104>, but you can't
do it.  Consider something like (adapted from the bug report)

<h1>Widget Sales by Year</h1>
<table>
<tr colspan="2"><th>
<h2>Widget Sales for 2006</h2>
<tr><th>Month<th>Number
...
</table>

It's not even allowed to insert a <section> in the right place here,
actually, so this particular example goes beyond automation problems.
IMO, it's not reasonable to suggest that it's inappropriate to put
headings in tables -- you could have a very long table and want its
sections to show up in your table of contents.  But you can't use any
sectioning elements here.
Received on Thursday, 29 April 2010 17:08:22 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:22 UTC