Re: suggestion for abolition of <hgroup>

Leif Halvard Silli, Mon, 27 Dec 2010 22:33:40 +0100:
> Lars Gunther on 27 Dec 2010 20:17:33 +0100 suggested:

>>  <h1>My terrific idea <span subtitle>How I saved HTML5 from
>>  being a mess</span></h1> [...]

> I believe an attribute solution must at the very least focus on the 
> element to be *included* in the algorithm, rather than on the ones to 
> be excluded, if it is to have a chance.

Two soloutions which take that approach:

(1)	 Boolean attribute - @toc identifies the element for the ToC:

       <h1><span toc >My terrific idea.</span>
           How I saved HTML5 from being a mess</h1>

(2) Content attribute - @abbr contains the text for the ToC:

       <h1 abbr='My terrific idea' >
        My terrific idea. How I saved HTML5 from being a mess</h1>

    If @abbr is emtpy, then no text lands in the ToC:

       <h1>My terrific idea.<h1>
       <h2 abbr=''>How I saved HTML5 from being a mess</h2>

@abbr is taken from HTML4, where it contains a short version of a table 
cell's content - a very similar function for very similar reasons.

Advantages to going for @abbr:
a) broadens existing HTML4 feature instead of inventing new concept
b) thus builds on existing AT support
c) as long as UAs are interested in implementing the algorithm,
   authors would not have problems in understanding how it works
d) CSS: h1{content:attr(abbr)}
   would replace the h1's content with the content of the @attr
   and it works in Opera + I think in Chrome + nightly Webkit.
   In contrast, the CSS selectability of the different <hgroup>
   elements cannot be as programmatic, without a new CSS selector.
e) it is questionable how often it is useful to make the
   heading differ from its ToC representation. @abbr is a bit more
   tedious and thus makes sure it doesn't happen too often
f) @abbr is very flexible: 
   * doesn't need to exactly reflect any part of a heading 
   * can be empty, which allows several heading elements 
     to be used - much like <hgroup> - see the example above.
   * can be no-empty = allows use of single element.
g) introducing h1@abbr should also open the door for th@abbr's 
   return - currently that attribute is not permitted in HTML5.
   By seeing how it works for headings, authos are also helped
   undestanding how it works for table cells.

In that regard - regarding the editor's abolition of <th abbr=*> and 
<td abbr=*> in HTML5: 

	It is unclear to me how the spec can claim that the td@abbr and the 
th@abbr use case can be solved by telling authors to "Use text that 
begins in an unambiguous and terse manner, and include any more 
elaborate text after that". 
	If the table cell use case can be solved like that, then the subtitle 
use case should be possible to solve in the same way! 
	If the spec insists on the uselessness of td@abbr, the alternative is 
to introduce hgroup inspired markup - instead of @abbr - for 
identifying the short version of a table cell.
-- 
leif halvard silli

Received on Tuesday, 28 December 2010 00:52:13 UTC