WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: HTML heading styles

for

From: Jukka K. Korpela
Date: Oct 19, 2004 6:23AM


On Tue, 19 Oct 2004, martin wrote:

> I have a quick question about HTML heading styles.

It's technically about heading _elements_. In Web authoring, it is best to
reserve the word "style" for styling presentation (mainly with CSS).
This is a bit confusing, since if you use e.g. heading styles in MS Word,
then save as HTML, Word will create heading elements (which is nice, but
the Word terminology confuses presentation with structure).

> Now, we all understand that it's important to use heading styles to give
> structure to documents and enable screen-reader users to navigate a page.

Hopefully so... this is one of the key aspects of accessibility, also
because it makes it possible to view a page meaningfully with all
author-supplied styling suppressed in favor of user-controlled styling of
headings and other elements.

> A strict reading of WAI guidelines is that heading styles must be used in
> strict sequence ie. H1, H2, H3, H4, H5.

This has often been discussed on various fora. The experts' consensus is,
more or less, that heading levels should normally not be skipped, though
there might be different special cases - and there's some disagreement on
whether there are such cases and what they might be.

Basically, h1, h2, etc. are 1st, 2nd etc. _level_ headings, and h2, h3
etc. implicitly divide a document or part thereof into sections,
subsections, etc. This was said very clearly in the HTML 2.0
specification, later sadly obscured by babble about "importance".
For example, among 2nd level headings, some may well be much more
important than others. But they should still all be h2 elements.

The relevant item (or "checkpoint" - a misnomer for a rule) in WAI
guidelines is 3.5, and the wording is somewhat vague, but the related
techniques document says the rule rather explicitly:
http://www.w3.org/TR/WCAG10-HTML-TECHS/#document-headers

> However, not all pages lend themselves to this; on some pages it is
> appropriate to move, for example from H1 to H2 to H4.

Hardly. What you might find suitable is _styling_ e.g. h2 elements much
less prominent visually than h2 are by browser defaults. But this is
styling issue and can be dealt with properly. It's simply wrong to make a
2nd level heading h3 or h4 just because you want smaller font; you can
easily put h2 { font-size: 120%; } or something like that into your style
sheet instead.

> My question to the group is whether this is a problem in terms of
> accessibility ?

It could. For example, a user agent that constructs a table of content for
quick overview, or for use in navigation, would probably produce something
that confuses the user - it may look or sound as if the document were
wrongly structured and the table of content distorted.

> My feeling is that this approach enables us to use headings consistently so
> that a particular heading level always corresponds to the same type of
> information.

You might have one of the rare special cases then. Hard to tell without a
URL. Maybe the material is indeed structured into sections, subsections
etc. so that some of them lack headings. But won't this create confusion
anyway? Auxiliary intermediate headings might help everyone.

> However RNIB took the view on a recent audit that skipping heading styles in
> this manner was illegal.

I wonder why. What law might apply? Anyway, the WAI item 3.5 is not
crystal clear, and using h1 followed by h6 does not violate HTML 4.01
specification (which oddly almost laughs at structured use of headings
by labelling it as "some people's" opinion only). So the question arises
what the normative status of the HTML techniques document is. Assuming
that the law says just "follow WCAG 1.0 guidelines" or something similar,
I would surely vote "not guilty" as a jury member.

But it _would_ be possible, technically, to require by law that heading
levels be not skipped. The ISO HTML standard (a little known exercise in
futility, in general) even shows how the rule could be formalized.

> Any opinions on this ? Please reply directly to me ( <EMAIL REMOVED> )as
> well as the list.

Done, but such requests will often be missed by people who respond, so I'm
afraid you need to read the list anyway, so Cc'ing isn't that useful.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/