Re: hgroup and ARIA outline in ISSUE-129 [Was: SSUE-129: replace or modify the ARIA section of the HTML5 spec - chnage proposal and replacement spec text]

On 11/28/2010 11:40 PM, Bruce Lawson wrote:
> On Sun, 28 Nov 2010 20:34:37 +0800, Benjamin Hawkes-Lewis
> <bhawkeslewis@googlemail.com> wrote:
>
>> On Sun, Nov 28, 2010 at 11:47 AM, Steve Faulkner
>> <faulkner.steve@gmail.com> wrote:
>>> I am not proposing that hgroup is ignored, I am suggesting that in the
>>> context of a user of AT moving through page content, as against
>>> accessing
>>> and naviagting via a page outline, the presence of the hgroup as a
>>> heading
>>> does not make sense.
>>
>> These are certainly different scenarios, but ARIA/accessibility API
>> mappings might be used for both these scenarios.
>
> The complexity is that the outlining algorithm and the "normal" browser
> view are different.
>
> <hgroup>
> <h1>Acme Widgets PLC</h1>
> <h2>The finest Widgets that wonga can buy</h2>
> </hgroup>
>
> has 2 headings in "normal" full page view - the h1 and the h2.

No it doesn't. It has the one heading "Acme Widgets PLC". There is (by 
definition) no difference between the headings in the "full page view" 
and the headings in the outline view.

> The code above, however, has only one heading ("Acme Widgets") for the
> purposes of constructing an outline; the <h2> is removed from the
> document outline as the outlining algorithm requires. But is still makes
> no sense to me for the <hgroup> to have any ARIA/Accessibility API
> mapping. It does nothing in itself, it just tweaks the semantics of its
> contents in one specific circumstance - the "outline view".

As far as I can tell, some things are unambiguous:

Outside <hgroup> heading elements act like they have role="heading"

Inside <hgroup> headings other than the first in the highest-ranking set 
of descendant h1-h6 elements have no implicit role, at least none that 
can be expressed in aria (it seems that the correct semantic, 
"subheading", does not map onto aria).

The only remaining question is whether it is more useful to consider the 
hgroup itself to act as if it had role="heading", or the descendant 
heading h1-h6 element that provides the heading text as having 
role="heading". The former is more theoretically pure, the latter may 
(or may not) be more pragmatic.

> (I have considerable misgivings about <hgroup> anyway; as I speak at
> events etc, everyone finds the concept hard to grasp. I wonder whether
> the presence of two or more headings h1 ... h6 within one single
> <header> isn't enough to make the outlining algorithm to magically
> ignore the lower-hierarchy Hx elements without needing another element
> to do it)

That was the original design and people found it more confusing (well 
there were lots of instances of people misunderstanding that on IRC, 
compared to the number who have misunderstood <hgroup>). Possibly adding 
a <subheading> element would be even better. It depends what the desired 
back-compat story is.

Received on Monday, 29 November 2010 15:53:19 UTC