About the main element

Hello,

i was checking the documentation of the main element<http://www.w3.org/TR/html5/grouping-content.html#the-main-element> recently and noticed that an example
provided in the description might contain a problem and might (re)open an interesting
debate.

The example is the graduation programme. Here is a simplified version to illustrate the problem.

header
  nav
    ul
main
  h1

This code will produce the following outline regarding the HTML5 outliner :

1 - [Document] Graduation
  1 - [Nav] Untitled

This outline is structurally correct, but not user friendly for an AT user. Knowing that
a majority of these users prefer to navigate in pages using headings<http://webaim.org/projects/screenreadersurvey5/#finding>, the absence of a
comprehensible title for the navigation section might be a problem.

Regarding the HTML 4 outline algorithm, the outline looks better.

1 - Graduation
  …

Because the outliner uses only explicit headings, the outline is correct, but a bit simple and
not informative for the AT user. Where is the navigation ?

But then comes another problem…

If we decide to help AT users by providing an explicit heading (an h2) for the nav section,
everything is ok in the HTML5 outline, but the order becomes wrong in the HTML 4 outline
because the h2 comes before the h1.

2 - Navigation
1 - Graduation

A solution could be to move the nav menu to the end of the document and to provide a link
to skip the main content and reach the navigation. But it’s not always possible (for layout
reasons for instance…).

In my understanding, if there is a main element in a document, it’s the best candidate to own
the h1 tag. But what happens if some sectioning content comes before the main element ?
The HTML5 outliner deals quite well with it, but the HTML 4 outline becomes messy if we use
explicit heading in that sectioning content (which is desirable in my opinion). Thus, knowing
that the support of HTML5 is extremely variable regarding AT, what can authors do ? I guess
i know the answer for some time now since it’s not a new problem, but regarding the example
in the spec, i thought it could be interesting to collect several new opinions about it.

At least, shouldn’t the example in the specification be reorganized in a way that works well in
both outlines ?

Thanks,

Dominique

Received on Monday, 26 January 2015 13:26:00 UTC