What’s the definition of definition list?

Journal entry
December 6, 2007

According to the HTML 4 specification a definition list can be used to mark up dialogues. Mark Norman Francis objects to this, and in “his article on 24 ways” he goes on to claiming that using definition lists for anything but glossaries, lexicons and dictionaries is a crime against markup:

Living by the specification, a definition list should be used for term definitions – glossaries, lexicons and dictionaries – only.

Hm, no. Living by the specification, a definition list should be used for what the specification states it should be used for - and that includes dialogue even if we don’t find it particularily apt or pretty. The specification states

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

However, living by the screen readers (which appears to be partly what Mark is arguing we should), Marks conclusion is correct: Definition lists should be used solely for cases where a term equals a definition, since that’s how screen readers present it.

That’s all theory

But all the above is purely theoretical blabber. In the real world where we craft website that are usable and accessible, I might agree with Mark that it’s probably not sensible to use definition lists to mark up those cases where X doesn’t equal Y. - especially if you want to be supportive of your blind, screen-reader-using visitors (and who doesn’t).

Definition lists for forms

I have a tendency to use definition lists for forms, and Marks article haven’t changed my mind about that.

In the context of a login form, the “Password” does indeed equal the password input field - at least assuming the user enters the proper password. I’d even argue that the term “Password” is also defined by the descriptive help text of the form, which therefore could also be put into a dd element - all while adhering to the specification.

I won’t go as far as claiming that it’s a good use, and I have not performed any kind of usability test with screen readers. But it’s definitely a valid use within the specification - no matter what some screen reader (literally) says.

Categories
, ,
Selling out
Did you know?
Jakob is an independent web application developer who builds awesome stuff for the web. You can hire him to build awesome stuff for you.

Comments and Trackbacks

Benjamin Quorning December 6, 2007

I have no problem with using definition lists for other things than glossaries etc. I think I even used it for images and their captions once…

Using definition lists for forms, though, is something I hadn't thought of, especially since forms already have plenty of tags of their own (label, fieldset, legend etc.). Ever since reading ALA's Prettier Accessible Forms , I have created forms using ordered lists, which works out just fine.

Krijn Hoetmer December 7, 2007

Hehe, when I read that article on 24 Ways I immediately had to think about (the HTML of) your site ;) I agree with you on form layouts, but aren't you going a bit overboard here?

Jakob S December 7, 2007

Heh, absolutely. I am molesting definition lists here. I would never recommend anyone doing what I do here ;)

Commenting on this entry has been closed.