Re: suggestion for abolition of <hgroup>

Considering the <hgroup> as a list is interesting and can be a concept authors may understand. However, there remains the fundamental situation: the <hgroup> is a new idea, with only one enclosed element outlined. Regardless of what name is given to the tag or what descendent tags are allowed, authors are going to have to learn this fact and learn to identify the element that will be outlined.

Providing an attribute to specify a subtitle may clarify code in a marginal way when used correctly. But it is one more thing to use incorrectly.

I do not believe <p> should be allowed in an <hgroup>. A heading is not a header. <hgroup> is a new element. There is no legacy code to deal with.

The importance is having a clear definition in the spec and a clear explanation with plenty of annotated examples in the HTML: The Markup Language Reference.

-Doug Jones

On 2010 Dec 09, at 07:38, Leif Halvard Silli wrote:

> Bruce Lawson, Thu, 02 Dec 2010 20:15:59 +1000:
> 
>> <h1>BruceLawson.co.uk</h1>
>> <h2 subtitle>Gorgeousness in a gimp mask</h2>
> 
>> […] you're putting the attribute on the thing that you want 
>> affected, rather than around it and some other stuff. And the word 
>> "subtitle" does what it says on the tin.
> 
> Here is a proposal witout the disadvantats that James mentioned:
> 
> <hgroup> really is a kind of list container, where only one of its list 
> items are (outline) signficant. The authors' most important problem 
> lays in undestanding that it is, in fact, a list format: A heading 
> element which is a list is a new thing. To, subsequently, understand 
> that only one of the list items are used outlines, is then simpler to 
> understand.
> 
> How could we make this simpler to grasp for authors? Like so:
> 
> 1) expand the possible list items to also include <p>, 
> 2) change the name from <hgroup> to <heading>.
> 
> This also allows to have a generic heading element:
> 
> 	<heading><p>Lorem ipsum.</p></heading>
> 
> If, for back-compat reasons we find that a single <p> _alone_ should 
> not be permitted, then can disallow that, for now. And allow it later 
> on, when UAs have catched up.
> 
> Summary of the proposal:
> 
>      Name: <heading>
>   Content
>     model: * Permitted content: <p> and h1-h6 elements.
>            * Must contain: 1 or more of the permitted elements;
>            * Two variants:
>              # Generic: <heading><p> Lorem </p></heading>
>                         (with 1 or more <p> elements inside)
>              # Subtitled: contains 1 ore more h1-h6 elements
>                           and zero or more <p> elements
> Occurrence: * Generic: only permitted in <section> & <article>
>            * Subtitled: everywhere h1-h6 elements are permitted
>   Outline: * the first, highest ranking element is used. When 
>              a generic <heading> has 2 or more <p> elements,
>              then the first <p> is used.
> 
> Comments:
> 
> * By naming the element <heading>, it's clear that "this is a
>  heading". (By contrast, the name "heading group" does not 
>  offer much help for interpretation at all.)
> * By allowing <p> as the only content, we have a generic header.
> * The fact that <heading><p>foo</p></heading> will be seen as a
>  paragraph by legacy browsers is useful.
> * Legacy user agents as well as screen readers, can automatically
>  cope with something like this:
>  <heading>
>    <h1>Main heading</h1>
>    <p>Sub title</p>
>  </heading>
> * By limiting the use of the generic variant to <section> and 
>  <article> we mildly encourage use of those elements. 
> * By not allowing the generic variant outside <section> and 
>  <article> we make sure that <heading> can be interpreted in a
>  meaningful way by legacy user agents.
> * The subtitling "act" becomes more logical: To have a subtitle,
>  one must also have something which is *not* a subtitle, namely
>  a h1-h6  element. 
> * Inside a <section> element, <heading><h1></h1></heading> and 
>  <heading><p></p></heading> would have the same semantics.
> 
> Leif Halvard Silli

Received on Wednesday, 22 December 2010 14:58:23 UTC