W3C home > Mailing lists > Public > public-html@w3.org > March 2013

Use cases for <hgroup> ? [WAS] revisiting <hgroup> in HTML

From: Steve Faulkner <faulkner.steve@gmail.com>
Date: Wed, 6 Mar 2013 19:16:17 +0000
Message-ID: <CA+ri+VkCFYmWc-A=e4Y67u8W+E7B1WFJ9-DOww0pbgdz-mwh_Q@mail.gmail.com>
To: HTMLWG WG <public-html@w3.org>
Thanks for the discussion so far!

In regards to use cases, the only stated use case for <hgroup> is/was[1]:

"The point of hgroup is to hide the subtitle from the outlining algorithm. "

Its only stated reason for being in HTML is to support a non essential case
in an algorithm that is not implemented in any browser

I suggest a  good starting point for supporting the continued inclusion of
<hgroup> in HTML would be to provide some use cases that actually warrant
the element.

It should also be noted that hiding a subtitle from the outline algorithm
is no longer a requirement as the following was added to the spec some time
last year:

How a user agent exposes such multi-level headings in user interfaces (e.g.
> in tables of contents or search results) is left open to implementors, as
> it is a user interface issue. The first example above could be rendered as:
> The reality dysfunction: Space is not the only void
So what are the use cases for <hgroup>?


[1] http://wiki.whatwg.org/wiki/Rationale#hgroup_and_other_heading_elements

On 6 March 2013 14:26, Steve Faulkner <faulkner.steve@gmail.com> wrote:

> 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 19:17:31 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:32 UTC