WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Headings

for

From: Chris Hoffman
Date: Jan 5, 2010 7:06PM


On Mon, Jan 4, 2010 at 2:05 PM, Jorge Fernandes < <EMAIL REMOVED> > wrote:

> In a navigation scheme my thought is that we are semantically in
> presence of a definition term, where "main navigation" is the <dt>
> (definition term) and the options are the <dd> (definition data).

I can't help but feel a little uncomfortable using definition lists
like this. A list of links does not define the term "main menu". On a
close reading of the HTML spec, it turns out that H1, H2, H3, etc.
headings are very similar to DT elements. Both types of elements, for
example, contain inline content that gets associated with the
block-level content underneath it. The primary difference is in the
_direction_ of that association. Here's what the HTML 4.01 spec says
about headings:

"A heading element briefly describes the topic of the section it introduces."

And here is what it says about definition lists:

"Definition lists vary only slightly from other types of lists in that
list items consist of two parts: a term and a description."

So a heading element describes the content that follows it, while a DT
_is described by_ the content that follows it. Ergo, since the term
"main menu" describes the list of links that follows it, it should be
a heading and not a DT.

In short, I think it's dangerous to stretch the semantics of elements
in order to overcome problems with user agents.

--Chris