revisiting <hgroup> in HTML

Hi all,

as you may know I have been a long time critic of the <hgroup>[1] element
for a number of reasons including:

it promotes an anti-pattern of multiples Hx's to indicate subheadings.

I call it an anti-pattern as
* the pattern of using a heading to indicate a sub heading does not convey
clearly that a particular heading is in fact a sub heading.
* this pattern was not a common pattern, and is still not a common pattern
(grepping data from 35000 web pages [6])
* the markup patterns and use of classes to indicate subheadings/subtitles
etc in web content (grepped data set [6]) supports a feature more like
<subline>[7] than <hgroup>
* the heading semantics are still exposed to users that consume them
(resulting in additional cognitive noise for no benefit and confusion as a
heading typically prefixes and labels non heading content and is not
followed by one or more headings)
* as currently specified in HTML5 (must level requirement- but not
implemented by any user agent) [2] the use of <hgroup> has the effect on
accessibility layer semantics of concatenating headings and 'subheadings'
into one heading:

<hgroup>
<h1>heading</h1>
<h1>sub heading</h1>
</hgroup>

becomes

<h1>heading subheading <h1>

which effectively removes any notion of a subheading semantic for users and
any way for it to be conveyed via an accessibility API.

There have been a number of proposals in regards to
modification/removal/alternatives to <hgroup> [3] and as <hgroup> does not
currently have 2 reasonably complete interoperable implementations ( CSS
and parsing are implemented, but the accessibility semantics are not so it
is effectively nothing more than a div by another name.) I requested that
it be dropped from HTML5.0 [4]. The request will come up for a decision on
12th March[5].

Questions arise as to what to do with <hgroup> for HTML 5.1.

My suggestion is to make it obsolete and provide authoring advice in the
common idioms section about how to markup subheadings using existing HTML
elements- illustrative examples:

<h1> heading
<span class="subheading">sub heading</span>
</h1>

<header>
<h1> heading </h1>
<p>sub heading </p>
</header>

<div class="heading-group">
<h1> heading </h1>
<p>sub heading </p>
</div>


My questions include:
If we want to provide a subheading feature why not do so in a way that the
semantics are clearly provided to any user that could consume them?
If not then what is the use of hgroup other than a styling hook?

what do others think?

[1]
http://www.w3.org/html/wg/drafts/html/master/sections.html#the-hgroup-element
[2]
http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-strong-native-semantics
[3] http://www.w3.org/html/wg/tracker/issues/164
[4] http://lists.w3.org/Archives/Public/public-html-admin/2012Dec/0019.html
[5] http://lists.w3.org/Archives/Public/public-html-admin/2012Dec/0073.html
[6] data set used from http://webdevdata.org
[7] http://www.html5accessibility.com/tests/subline.html
-- 
with regards

Received on Wednesday, 6 March 2013 14:28:07 UTC