W3C home > Mailing lists > Public > public-html@w3.org > May 2014

should HTML have a <heading> element?

From: Steve Faulkner <faulkner.steve@gmail.com>
Date: Fri, 9 May 2014 09:32:22 +0100
Message-ID: <CA+ri+V=+Bi=Vmnq0sta5wOH2xnjU7uCCS=AQLvY5cgWa7ECg9Q@mail.gmail.com>
To: HTMLWG WG <public-html@w3.org>
Cc: Marco Zehe <marco.zehe@googlemail.com>
discussion starter:

HTML5 has the outline algorithm [1] (as yet largely unimplemented  ) which
effectively removes the semantic meaning of numeric headings.



does not mean a heading level 6 it means a heading level 1

<section />
<section />
<section />
<section />
<section />
<section />

does not mean a heading level 1 it means a heading level 7

It has been suggested by marco zehe from Mozilla [3] that

the only clean way forward for the outline algorithm is this:

1. Leave h1 to h6 alone as they always were. h1 through h6 are always that
> regardless of what they are nested in.
> 2. Introduce a new element named "heading" or the like that is the only
> element
> participating in the outline algorithm. it gets a level of 1 by default,
> and a level of
> greater than 1 depending on which section elements it is nested in. So a
> section heading gets
> a level of 2, a section section heading gets a level of 3 etc. And the
> calculation of the
> levels is the sole responsibility of the browser, indicating the
> calculated level as an
> implicit aria-level attribute. Styling could then be based off the section
> nesting or
> the proposed DOM attribute that would correspond to implicit aria-level.
> This is the only way where there is a clean choice for web developers: Use
> the limited 1 to 6 heading levels,
> or choose a more free and modern way of structuring documents, and the
> browser takes care of communicating
> the level to assistive technologies.

A custom <heading> element [2] designed to explore how such a feature could
work in practice is in development.

[1] http://www.w3.org/html/wg/drafts/html/master/sections.html#outlines
[2] https://github.com/ThePacielloGroup/w3c-heading#w3c-heading
[3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=25003#c18



HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>
Received on Friday, 9 May 2014 08:33:30 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:09 UTC