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

RE: Change Proposal to replace hgroup with a simple element > Naming and use

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Mon, 7 Nov 2011 13:31:37 +0100
To: Kornel Lesiński <kornel@geekhood.net>, Dean Leigh <dean.leigh@deanleigh.co.uk>
Cc: public-html@w3.org
Message-ID: <20111107133137041103.1f69dfdf@xn--mlform-iua.no>
As Silvia said, <sub> is occupied. How about <hcaption>?

With <hcaption>, it obvious that it has no meaning in a section without 
<h1-h6> elements. And it also builds upon the name pattern that 
<figcaption> has initiated. I also think that <hcaption> very 
effectively could prevent the belief that a subheading can be used 
*without* any associated heading. Further more, it is already clear to 
most authors that a caption is not displayed in a Table of 
Contents/outline. The name <hsub> also has the problem that it sounds 
as if it has to appear *after* the element, when in reality it can also 
occur before it.

Risk: Some might think <hcaption> could go *inside* the <h1-h6> element.

Answers to the risk: 

* The CP says that authors optionally *may* place it inside the
  <h1-h6> element - which in turn would lead its content to be 
  shown in the outline. 
* Since the name <hcaption> could help the author to understand
  that content should *not* be displayed in the outline, then -
  provided the author has access to something that shows the 
  outline (*) - this problem would be solved by itself.
* As for before or after, then captions are usually occur after
  the the thing that they caption, but may also occur before -
  as we know from <table>'s caption element.

(*) I found a add-on for Opera that displays the outline, and I expect 
e.g. iCab - which has had a outline tool for long - would do the same.

Leif H Silli

Dean Leigh, Mon, 7 Nov 2011 07:29:08 -0000:
> I think the naming of this element as <hsub> indicates and therefore 
> restricts its use to only being a sub Sub-Heading.
> Whereas <subline> may in future be used as 'sub' to other elements 
> e.g. <caption>, <figcaption>.
> Therefore I would like to propose that the element be further 
> simplified to <sub>.
> - This addresses the semantic issues as it is a <sub> of its preceding tag
> - It can be ignored in outlines
> - It can be styled easily with >
> We can then which focus discussion on which tags are eligible for <sub>.
> Regards,
> Dean Leigh
>>> -----Original Message-----
>>> From: Simon Pieters [mailto:simonp@opera.com]
>>> Sent: 07 November 2011 06:40
>>> To: public-html@w3.org; Kornel Lesiński
>>> Subject: Re: Change Proposal to replace hgroup with a simple element
>>> On Mon, 07 Nov 2011 00:38:32 +0100, Kornel Lesiński
>>> <kornel@geekhood.net>
>>> wrote:
>>>> 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.
>>> So basically it's associated with a section in the same way as <p>.
>>>>     <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.
>>> FWIW, I think this proposal is better than the <p>-in-<header> proposal
>>> (which changes meaning of <p> based on placement) and the <subline>
>>> proposal (which allows <h2> in <subline> so still breaks the outline in
>>> legacy impl).
>>> My only concern with this proposal is whether <hsub> should be allowed
>>> "anywhere" or if it should be restricted in some way (e.g. require a
>>> heading in its section, don't allow it in implied sections unless it is
>>> follows the heading element directly).
>>> --
>>> Simon Pieters
>>> Opera Software
Received on Monday, 7 November 2011 12:32:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:28 UTC