Change Proposal to replace hgroup with a simple element

I agree with Lars Gunther that reuse of <h1-h6> for subheadings causes  
nothing but trouble, and subheadings can be marked up in a more  
straightforward manner.

I'd like to propose a new element that IMHO is much easier to understand  
and use correctly, satisfies all major use cases of <hgroup> and does not  
break outline in legacy UAs.

The proposal is in the wiki:
http://www.w3.org/html/wg/wiki/ChangeProposals/hSub

----

Change Proposal

    Replace <hgroup> with an element that has a simple content model and  
backwards compatibility.

Rationale

      * <hgroup> overloads meaning of <h1-h6>, making them either headings  
included in document
        outline or not, depending on context created by hgroup and other  
headings. No other
        element in HTML creates such ambiguous context-dependent meaning.

      * Name and usage of <hgroup> can be confused with <header>, since  
both appear in headers
        and group elements.

      * <hgroup>'s content model disallows adding extra <div>s around  
multiple subheadings, which
        may be needed as styling hooks.

      * Existing content on the web does not use as complex multi-level  
subheadings as <hgroup>
        was intended to support. There is no need to precisely mark up  
levels of subheadings, as
        the whole title is meant to be read in (document) order and  
subheadings are not used for
        sectioning/navigation.

Details

    <hsub> element is a subheading. It represents a subheading for its  
section (i.e. it is
    associated with the heading in the same section that the <hsub> is in).  
The algorithm for
    associating <hsub> with a section is the same as for <h1-h6>, except  
<hsub> does not imply
    new sections.

    <hsub> element has same content model as <h1-h6>.

    Optionally: <hsub> can be allowed to be nested inside <h1-h6>, which  
allows full title to be
    seen as a header in legacy UAs and makes it easy to style heading and  
subheading using CSS.

   Examples

  <body>
  <h1>Title</h1>
  <hsub>Subtitle</hsub>

  <h1>Second Title</h1>
  <div>
      <hsub>Second Subtitle 1</hsub>
      <hsub>Second Subtitle 2</hsub>
  </div>
  </body>

  <article>
      <hsub>The Magical</hsub>
      <h1>Title</h1>
      <hsub>That Has</hsub>
      <hsub>Multiple Subtitles</hsub>
  </article>

   Styling

    The most common usage of subheadings can be styled simply with h1 +  
hsub CSS selector.
    Authors can make complex headers easier to select by wrapping headings  
and subheadings in
    <header>. Relaxed content model allows "styling hook" elements to be  
added as necessary.

   Authoring errors

    Mistakes in usage of <hsub> cannot break document outline, which is a  
significant improvement
    over <hgroup>.

    At worst, in a rather rare case of subtitle preceeding the title,  
subtitle may end up
    associated with an earlier heading:

  <h1>Unrelated title</h1>
  <p>Content</p>

  <hsub>Preceeding subtitle</hsub>
  <h1>Title</h1>

    However, this kind of mistake can be easily eliminated by use of  
<section>/<acticle>
    elements:

  <section>
    <hsub>Preceeding subtitle</hsub>
    <h1>Title</h1>
  </section>

Risks

    Removal of the <hgroup> element.

-- 
regards, Kornel Lesiński

Received on Sunday, 6 November 2011 23:39:08 UTC