Re: Preparing to launch the Forms Task Force ...

Laurens Holst wrote:
> My point of view is that <h1>...<h6> do not imply any kind of sectioning 
> at all, they only specify headings, and the section that follows is 
> implicit. The WHATWG complicates matters by pretending that they do, and 
> dedicating a huge section to it too.

   From the HTML 4.01 Spec [1]:

| A heading element briefly describes the topic of the section it
| introduces.


| The following example shows how to use the DIV element to associate a
| heading with the document section that follows it.


| <DIV class="section" id="forest-elephants" >
|   <H1>Forest elephants</H1>
|   <P>In this section, we discuss the lesser known forest elephants.
|   ...this section continues...
|   <DIV class="subsection" id="forest-habitat" >
|     <H2>Habitat</H2>
|     <P>Forest elephants do not live in trees but among them.
|     ...this subsection continues...
|   </DIV>
| </DIV>

   It's pretty clear that headers are semantically the introduction of a
section. The specification simply lacks a definition for how to
determine the bounds of the section.

> However, I don’t see how it can do this, as text from a level-1 section 
> that continues after a level-2 section will be classified incorrectly to 
> be in the level-2 section. Instead of just not being classified into 
> sections at all, *because the original document did not provide that 
> information*!

   The above example from the spec clearly has that information.

   Now, I will concede that the semantics of <div> are weak. In fact,
it's the poster child for why |role| would be a dismal failure. Here you
have an element being used for sections right in the specification with
the class name "section", and there are probably only a handful of
people who've actually marked pages up that way.

   However, the semantics of <h1>-<h6> are clear about the fact that
these elements begin sections. I would suggest that one way to process
them is that they should be tied to their parent elements. The first
<div> in the example above has a heading, then the child <div> has a
heading, therefore the child <div> is a subsection of the parent.
Associate elements accordingly. If there are two heading elements on the
same level, then the second one begins a new section.

   There have been several other proposed algorithms for this as well.
I'm not suggesting the one above is the best. I'm merely trying to
determine why you feel that the task is somehow impossible.

> And even if you would want to specify it. I mean, it’s *really* obvious. 
> “Each heading starts a new section according to their level, which lasts 
> until the next heading or the end of the document”.

   This is directly contrary to the implied semantics of the markup
example from the spec above, which clearly implies nesting.

> There, put that
> phrase in the spec instead of that whole chapter. There is no need to be 
> overly meticulous about it, like WHATWG spec section “Creating 
> an outline”.

   Essentially, you're advocating abandonment of HTML 4.01 heading for
use in creating things like a Table of Contents, for which the elements
were originally intended.

   I would agree that we don't have to support non-semantic use cases
for <h1>-<h6>, but if authors made their best attempt to use these
elements semantically and correctly, their efforts should not be discarded.


Received on Monday, 19 March 2007 11:42:23 UTC