W3C home > Mailing lists > Public > public-html@w3.org > January 2011

Re: hgroup: a possible alternative

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Tue, 11 Jan 2011 18:49:57 +0100
To: Philip J├Ągenstedt <philipj@opera.com>
Cc: public-html@w3.org
Message-ID: <20110111184957507230.c90f8694@xn--mlform-iua.no>
Philip J├Ągenstedt, Tue, 11 Jan 2011 16:35:53 +0100:
> On Tue, 11 Jan 2011 16:20:54 +0100, Leif Halvard Silli:
>> Dean Leigh, Tue, 11 Jan 2011 10:58:53 -0000:

>>> Why not:
>>> <h1>Main Heading</h1>
>>> <sh>Subheading</sh>
>>> <p>The content</p>
>> Why not simply say that <hgroup> may contain a single heading element
>> pluz zero or more <sh> elements?
> How would that be better than the <hgroup> solution we already have? 
> Sounds like it's just renaming a <hx> element to <sh>...

<sh> does not have the feature of <hx>, so it is more than a renaming. 
(Btw, we can always bikeshed the exact name ...) To say that <hgroup> 
can take a single <h[1-6]> element plus zero or more <sh> elements, 
would be better than the current content model because:

1) it solves what Steve's main problem with the current model:

Steve Faulkner, Tue, 11 Jan 2011 10:11:50 +0000:
> I like the idea, i think the main issue with hgroup is that authors
> find it difficult to understand that some headings in hgroup are no
> longer h1-h6 but some vaguely defined subtitle/subheading/tagline

2) it has better back-compatibility: 
<hgroup><h1>Main</h1><sh>Sub</sh></hgroup> produces only a single 
outline item in legacy as well as HTML5-compatible user agents. (Your 
<h1>Main <subhead>Sub</subhead></h1> has the same advantage, but would 
- nevertheless - also cause legacy user agents to, as well, include the 
subheading in the outline item.)

3) the algorithm for finding the outline text of a hgroup element could 
be simplified to only look for the first heading element. Thus, the 
heading element would *positively* identify the outline text, without 
the current content model's complicating additional rules (which says 
that the rank and the order in which they appear - if there are two of 
same rank - matters as well).

4) at the same time, for existing HTML5 pages, the current outline 
algorithm would continue to work as is, in the majority of use case. 
(Only pages with the highest ranking heading *after* the lower ranking 
heading(s), would break.)

5) it allows <hgroup> to be seen as a single header instead of a vague 

Steve Faulkner, Tue, 11 Jan 2011 10:11:50 +0000:
> I came up against the vagueness issue when trying to work out what
> default roles for such headings and the hgroup itself should be.
> as brucel puts it "It (hgroup) has no rendering; its sole purpose is
> to hide subtitles from the outlining algorithm"
> http://www.brucelawson.co.uk/2010/on-the-hgroup-element/

In contrast, the purpose of <hgroup> would become to keep <sh> and <hx> 
together. And the purpose of "hiding the subtitle from the outlining 
algorithm" could be dropped.
leif halvard silli

Received on Tuesday, 11 January 2011 17:50:32 UTC

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