Re: Use cases for <hgroup> ? [WAS] revisiting <hgroup> in HTML

Steve Faulkner, Wed, 6 Mar 2013 23:17:08 +0000:

>> But in this case, could it not be possible to
>> redefine or 'shape up' the hgroup element so that the user experience
>> for e.g. a11y users becomes better and easier to understand?
> 
> Yes it would, question being why are we trying to polish a turd?
> 
> The suggestions in the spec about adding characters to delineate headings
> and sub headings are just that.
> 
> there is nothing defined for user agents its not even a should and in
> practice why would authors give over the styling/formatting of a heading to
> user agents?

That particular proposal about how to render, seems to have text 
browsers and other limited rendering canvases in mind. On the other 
side, there is also 
http://www.w3.org/TR/html5/rendering.html#rendering, which the spec 
expects graphical UAs to follow quite literally. And there is no doubt, 
in that section, that hn in hgroup defaults to be rendered like hn 
outside hgroup.

> If an author wants a heading/subtitle combo to look like this:
> 
> heading: subheading
> 
> she can do this
> 
> <h1>heading: subheading</h1>
> 
> why do this in the hope that it gets outputted as the author desires?

I think the spec’s point probably is that it would be (formally) valid 
to place colon there and render it on one line. And in fact, for 
navigation menus, we often use lists, which we render horizontally 
instead of their default display. So if a <ul> can be rendered on one 
line, why not a <hgroup> as well?

> <hgroup>
> <h1>heading</h1>
> <h2>subheading</h>
> </hgroup>
> 
> There is no requirement or even suggestion for any user agent to display
> the resulting heading is the same way.

In my view, that is to exaggerate the situation. See above. Display is 
not the problem. But semantics perhaps needs to be better defined - 
then it would be easier to accept that display varies.

> What about the meaning or appropriateness of the suggested characters : or
> () in differing languages, deo they all mean the same thing in Russian or
> Kenji or Mandarin as they do in English, how is the user agent going to
> handle differences?

The meaning of the colon is for the Unicode consortium to define. But 
Unicode has several colons, and if it was an Ethiopic text, then 
perhaps the Ethiopic colon would be the appropriate. The spec is 
written in 'en-US', or 'enUS-x-hixie' … The meaning of () and : for 
that variety of English, is well known. Punctuation is what we use to 
divide lines etc. Even a navigation menu could use punctuation, e.g. 
via CSS generated content, to separate the list items.

> If an author wants heading to be included in the as yet implemented
> document outline with a subtitle separated by a : or in () they can do this:
> 
> <h1>heading: sub heading</h1>
> 
> <h1>heading (sub heading)</h1>
> 
> if they don't they can do this:
> 
> <h1>heading</h1>
> <p>subheading</p>
> 
> or this
> 
> <header><h1>heading</h1>
> <p>subheading</p></header>
> 
> or this
> 
> <h1>heading</h1>
> <div>subheading</div>
> 
> or any other combination.

Would the above 'subheadings' be styled like (sub)headings? If yes, 
then wouldn’t the A11Y users loose information if those subheadings 
weren’t announced as such?  I don't think we can conclude that a piece 
of text isn’t a heading doesn’t occur in the ToC or in the outline, 
then it isn’t a heading. 
-- 
leif halvard silli

Received on Thursday, 7 March 2013 00:30:50 UTC