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 Sun, Nov 28, 2010 at 8:50 AM, Steve Faulkner
<faulkner.steve@gmail.com> wrote:
> looking at this futher I have come to the conclusion that the hgroup element
> should not have any default role as its only purpose is in relation to
> hiding sub headings from the outline algorithm. When a page is presented to
> user a in the browsing context any heading elements the hgroup contains
> should be presented with their semantics intact. The semantics of the hgroup
> is not relevant in this context.
>
> For the purposes of the outline algorithm the default role mapping to
> accessibility APIs appears irrelevant.

In ARIA, a "heading" is "A heading for a section of the page" with a
position in a "logical outline".

http://www.w3.org/TR/wai-aria/roles#heading

In HTML5, "Other elements of heading content in the hgroup element
indicate subheadings or subtitles" as opposed to representing
"represent headings for their sections" like standalone hX elements
and "hgroup":

http://dev.w3.org/html5/spec/sections.html#the-h1-h2-h3-h4-h5-and-h6-elements

http://dev.w3.org/html5/spec/sections.html#the-hgroup-element

Mapping "hgroup" to anything other than "heading", and mapping hX
elements in "hgroup" to "heading", changes rather than preserves their
semantics.

Assistive technology uses heading roles exposed to accessibility APIs
to represent and navigate document outlines (e.g. the list of headings
and ability to jump between headings provided by popular screen
readers).

The document outline presented and navigated by the user agent and the
document outline exposed to accessibility APIs for
presentation/navigation by assistive technology should be the same.

Consider a case where you have markup like:

<h1>A problem solved</h1>
<h2>Introduction</h2>
<p>Text for introduction section goes here</p>
<hgroup>
  <h3>Analysis</h3>
  <h2>The problem</h2>
  <h2>A mathematical model</h2>
</hgroup>
<p>Text for problem section goes here</p>
<h2>Solution</h2>
<p>Text for problem section goes here.</p>

HTML5 tells us the document outline is:

Level 1: A problem solved
    Level 2: Introduction
    Level 2: The problem
    Level 2: Solution

But if we ignored "hgroup" as you propose, AT would work with a quite
different outline like:

Level 1: A problem solved
    Level 2: Introduction
        Level 3: Analysis
    Level 2: The problem
    Level 2: A mathematical model
    Level 2: Solution

"Level 3: Analysis" has no associated section text, and indeed has
been moved into the wrong section.

"Level 2: The problem" and "Level 2: A mathematical model" imply two
distinct sections but in fact there's only one.

In effect, the document structure has been significantly misrepresented.

--
Benjamin Hawkes-Lewis

Received on Sunday, 28 November 2010 09:33:13 UTC