[html5] Using <section> and <h1> ? Theoretical?

Steve Faulkner faulkner.steve at gmail.com
Wed May 14 15:22:45 PDT 2014



HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>

> Date: Wed, 14 May 2014 14:04:25 -0700
> From: Micky Hulse <mickyhulse.lists at gmail.com>
> To: "help at lists.whatwg.org" <help at lists.whatwg.org>
> Subject: Re: [html5] Using <section> and <h1> ? Theoretical?
> Message-ID:
>         <
> CALri7MnCrmUWGvW1ca66ZbpZn_DUFWcQV-bGOFvb5LQAHQdDAg at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> Interesting conversation.
> Honestly, I'm still trying to soak all of this in.
> <my $0.0000002>
> In terms of HTML5 sections, etc., I understand (now) why one would
> choose to use an HTML4 heading approach (i.e., one <h1> per page,
> etc.).
> With that said, I'm concerned that W3C's new "authoring advice" will
> make it so the HTML5 "vision" (or parts of it, as I see it) never
> comes to fruition.
> THe W3C HTML spec does not say don't use sections as per the outline, it
just strongly encourages the use of h1-h6 to reflect outline depth in
conjunction with sections:

"Sections may contain headings of any rank, and authors are strongly
encouraged to use headings of the appropriate rank for the section's
nesting level."

This approach is both forward and backward compatible as Ian has pointed
 this code produces exactly the same HTML5 outline as replacing the h2-h6
with h1

<section><h2>heading text...
 <section><h3>heading text...
  <section><h4>heading text...
   <section><h5>heading text...
    <section><h6>heading text...

The difference being that the levels are correctly conveyed by user agents
to users using h1-h6 where as using only h1 they are not

> Steve, in reference to your "bringing it in line with reality" comment:
> I'm probably not thinking clearly, but isn't the point of an
> unfinished spec to be more forward-thinking? Why should an unfinished
> spec conform to software and technology that's lagging behind in terms
> of accepting a new way of doing things?

when a new feature is initially specced that is indeed the case, the
document outline has been in the spec for years and we are no closer to
getting it implemented.

> Shouldn't SEO tools/bots and screen readers conform to the new spec,
> not the other way around?

browsers need to conform to the requirements spec for the outline to convey
the semantics it purports to. To date as I have pointed out browser
implementers have shown no great interest  in implementing. I hope in
future that will change. To that end I have opened bugs on
fitrfox/webkit/IE and blink [1] and have been talking with implementers
directly in whatever forums available.

> in
> Should I not be concerned that the W3C's decision to ignore the
> outliner will make it so the <section>/<h1> technique becomes a thing
> of the past?
The W3C spec does not ignore the outline, as Ian has pointed out, much of
the W3C HTML spec is the same as the Whatwg spec. In the case of the
implementer requirements and definition of the algorithm there is no


   - expose (heading) level in acc layer based on heading elements outline
   depth – chrome
   - expose heading level in acc layer based on outline depth not heading
   numeric value – Firefox
   - AX: expose (heading) level based on heading elements outline depth –
   Webkit bug <https://bugs.webkit.org/show_bug.cgi?id=131920>
   - expose output of html5 outline algorithm as a DOM method – IE

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20140514/df0b7533/attachment.htm>

More information about the Help mailing list