RE: revisiting heading advice

Hi Adrian,

«Feel» is often synonymous with «think». Anyway, HTML5 says that if we 
don’t use <section>, then each use of an h1-h6 element implies a 
section. 

Per the spec, I could thus have done this - which (one could claim) is 
also mentally what I did:

<section class=Level-2 ><h2>Chapter</h2>
   <section class=Level-3 ><!--skipping <h3> suheading element-->
      <section class=Level-4 >
         <h4>Task</h4>
         …
      </section>
   </section>
</section>

If Web browsers *did* implement the HTML5 outline, then authors would 
be encouraged to follow the (yes) rigor that the HTML5 outline 
algorithm promotes. (And, btw, rigor can be a good thing.)

But alternatively, one could modify the HTML outline algorithm so that 
if you jump from <h2> to <h4>, without a <h3> in between, a wrapper 
consisting of a heading-less level 3 section is implied around the 
(implied) level 4 section - like in my code example above.

Frankly, I would prefer this variant, because outline level *is* 
semantic. And I don’t want <h4> to be moved upwards (or inwards) in the 
outline,  just because I ”forgot” to add the <h3> heading. Such a thing 
could be confusing not only to AT users but to every user.

Such a varian of the outline algorithm could be more compatible with 
the actual content «in the wild», including compatible with how legacy 
tools present outlines.

In a summary, I think use of <section> should trump use of headings, 
with regard to the level (thus, one can produce level 7, if one uses 
seven levels of <section>).  But when section is not used, then a 
”level jump” from - for instance - h1 to h4, should mean that (in this 
case) 4 levels of sections are implied, where two of them will be 
without heading.

Leif Halvard Silli

Adrian Roselli, Mon, 13 Jan 2014 15:46:57 +0000:
>> From: Leif Halvard Silli [mailto:xn--mlform-iua@målform.no]
>> Sent: Sunday, January 12, 2014 6:12 PM
>> 
>> Jukka K. Korpela, Thu, 09 Jan 2014 23:21:06 +0200:
>>> 2014-01-09 17:58, Leif Halvard Silli wrote:
>>>> Jukka K. Korpela, Thu, 09 Jan 2014 17:04:29 +0200:
>> 
>>> It might make sense practically to treat
>>> 
>>> <h1>...</h1>
>>> <h2>...</h2>
>>> <h4>...</h4>
>>> 
>>> so that the rank 4 heading is really at level 3, on the assumption
>>> that such markup has been used for rendering reasons
>> 
>> I work on the formatting of a text book with this structure:
>> 
>> Chapter (H1)
>>  [text]
>>   Subheading (H2)
>>    [text]
>>     Task heading (H3)
>>      [text]
>> 
>> But quite often, the a chapter might have no subheadings, while it 
>> still still
>> contains tasks and task headings. In that case, I don’t want the 
>> task headings
>> to move up to level 2, so I still use h3. I also don’t want any 
>> change in the
>> table of contents, where I use different styles for the different levels.
>> 
>> I don't feel that I select h3 for styling reasons though - it has to 
>> do with
>> semantics …
> 
> Except you just said you use different styles for different levels 
> and don't want that disruption in the table of contents. Which tells 
> me you are making that decision based on the style, not the 
> semantics. Unless you can clarify how you feel it's truly a semantic 
> decision to skip that level.
>
> To me, the issue you describe shouldn't be reflected in your HTML, 
> but in your CSS.
> 
> I think the task headings are at whatever level the natural flow 
> drops them (except <h7> and higher, since that doesn't exist). IMO, 
> it's appropriate that the <h4> should be structurally moved up to an 
> <h3> when parsed. Since the browsers aren't doing that anyways (as 
> far as I know), then it should be coded as an <h3> anyway.

-- 
leif halvard silli

Received on Monday, 13 January 2014 16:30:58 UTC