WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: RE: Trying to avoid using tables

for

Number of posts in this thread: 1 (In chronological order)

From: Jukka Korpela
Date: Wed, Aug 28 2002 12:54AM
Subject: RE: Trying to avoid using tables
No previous message | No next message

Kynn Bartlett wrote:

> The <dl> isn't restricted to definitions only,
> it's restricted to lists which are "like definitions".

On the practical side, <dl> markup is relatively useless on two accounts.
First, its semantics is so vague and its actual use on Web pages so varying
that it is impossible to design adequate processing for it in user agents.
Second, typical browser defaults as well as bugs in CSS implementations make
the visual appearance mostly unsuitable. I sometimes use it for some
definition lists (containing definitions in the strict sense), but I would
advice against using it for anything else, and even definition lists are
often better presented using other markup.

In fact, for any use of <dl> for a definition list as well as for most other
uses that make any sense, you can easily convert <dl> markup to <table>
markup that is both structured and actually tuneable in appearance (even
using presentational HTML if you like). A <dt> becomes <th scope="row">,
with <dfn> inside it if it's really a term being defined that you have
there; a <dd> becomes <td>.

> http://www.w3.org/TR/html401/struct/lists.html#h-10.3
>
> The operative word for the <dd> is _description_ and not
> _definition_.

Is it? The section you cite has the title "10.3 Definition lists: ...". But
the specifications are vague and obscure. They first clearly say it's a
definition, then start taking about something else.

> The description does not need to define the term,
> only describe it.

Is "1997-1998" a term? Maybe in some sense in some contexts :-) but hardly
in the sense relevant here. The point is that although there can be
different definitions, some of which might even be called descriptions only,
a _term_ is still something to which you should be assigning a meaning. Most
<dl> "description lists" have nothing resembling a term in their <dt>'s.

> Note the standard also says:
>
> "Another application of DL, for example, is for marking up
> dialogues, with each DT naming a speaker, and each DD
> containing his or her words."

That's one of the most absurd things in HTML specifications. They first
define a markup element (vaguely, but anyway), then they give an
"application" of it that has nothing to do with anything they have defined.

There's no real meaning left when such "applications" are presented as
exemplary. Or the only semantics left is that we have a collection of
ordered pairs. That's just a special case of a table. It's better to use
<table> markup then. Especially since in <table> markup you can use
constructs that improve accessibility (in the long run) and we can expect
user agents to become better in the processing of tables (but hardly as
regards to something odd like <dl>).

> Clearly, <dl> is not intended to be used exclusively for
> definitions.

It suffices to say that it is not _used_ for definitions mostly. It's
basically presentational markup - and not very useful even presentationally.

--
Jukka Korpela, senior adviser
TIEKE Finnish Information Society Development Centre
http://www.tieke.fi
Phone: +358 9 4763 0397 Fax: +358 9 4763 0399


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/