W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2012

Re: [whatwg] Outline Depth Does Not Correspond to Sectioning Depth?

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 9 Jul 2012 20:28:33 +0000 (UTC)
To: Hugh Guiney <hugh.guiney@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>
Message-ID: <Pine.LNX.4.64.1207092025300.30734@ps20323.dreamhostps.com>
Cc: whatwg <whatwg@whatwg.org>
On Mon, 26 Mar 2012, Hugh Guiney wrote:
>
> I am confused by the current definition of outline depth ( 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#outline-depth), 
> which, if I understand it correctly, states that the depth resets with 
> each sub-outline.
> 
> So, in the following:
> 
> <body>
>   <h1>Document Title</h1>
>   <section>
>     <h2>Section Title</h2>
>     <section>
>       <h3>Subsection Title</h3>
>     </section>
>   </section>
> </body>
> 
> …each heading would have an outline depth of 1, yet for:
> 
> <body>
>   <h1>Document Title</h1>
>   <h2>Section Title</h2>
>   <h3>Subsection Title</h3>
> </body>
> 
> …which is, according to the spec, semantically identical to the previous 
> example, each heading would instead have an outline depth of 1, 2, and 3 
> respectively.
> 
> At least, that is how this implementation ( 
> https://github.com/hoyois/html5outliner) behaves; I raised this issue 
> with the implementor and he seems to think it is the correct behavior—if 
> so, why? Wouldn't it make more sense to have the depths be 1, 2, and 3, 
> whether explicit sections are used or not?

The spec was indeed confusing here.

I've clarified the definition of "outline depth" to make it say that it is 
the depth in the _outermost_ outline that matters (since the <h3> element 
above is really in three outlines -- that of the <body>, and that of each 
<section> -- but the depth that matters is just that of the <body>).

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 9 July 2012 20:29:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:09 GMT