Re: role="subheading" or role="subtitle" to replace hgroup

I've done a HTML5 course and I'm always having trouble explaining hgroup.
I've found myself using it many times, it was useful as a styling hook.

You could keep hgroup just as a way to group headings together, but add
role=subheading to specify what is a subheading and what is not.
This would make hgroup a mostly presentational element, but could make the
use of hgroup with @subheading less ambiguous. It also makes the html easier
to read.

<hgroup>
<h1>My real heading</h1>
<p role=subheading>Silence is foo</p>
</hgroup>

<hgroup>
<h1>My real heading</h1>
<h2 role=subheading>Silence is foo</h2>
</hgroup>

Normal use cases of hgroup, but with subheading.

<hgroup>
<h1>Search by</h1>
<h2>Name</h2>
</hgroup>
...
<hgroup>
<h1>Search by</h1>
<h2>City</h2>
</hgroup>

etc

You have a group of headings that are tied together and should effect the
outline.

-Benoit Piette

2011/4/8 Bruce Lawson <brucel@opera.com>

> On Fri, 08 Apr 2011 10:00:45 +0100, Masataka Yakura <myakura.web@gmail.com>
> wrote:
>
>
>  Given that: major browsers now recognize hgroup in parsing and styling
>> level [1][2][3][4][5]; some people have already start using it; and
>> there are lots of books on HTML5 markup talking about using hgroup
>> along with sectioning elements, so I don't really want hgroup to be
>> removed from the spec...
>>
>
> As the author of an HTML5 book, I'd be delighted to remove hgroup from it
> and talk about <div role=subheading> or <div subheading> or whatever.
>
> (Not speaking as a rep from Opera)
>
> --
> Hang loose and stay groovy,
>
> Bruce Lawson
> Web Evangelist
> www.opera.com (work)
> www.brucelawson.co.uk (personal)
> www.twitter.com/brucel
> Buy my HTML5 book www.introducinghtml5.com
>
>

Received on Friday, 8 April 2011 13:13:11 UTC