WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: SPAM-LOW: Definition Lists Within Forms

for

From: Dawn Budge
Date: Feb 18, 2011 3:21AM


You are right, no accessibility issues if used in addition, but replacement would be terrible as the impact on AT users (screenreaders and speech input) would be severe.
In terms of semantically defining the relationship between text and input field, that is captured via label and fieldset elements so any use of lists doesn't add to the form hierarchy. Definition lists attract some controversy in their semantic use. One camp (myself included) thinks that definition lists are strictly for dictionary-style definitions like glossaries, and the definition of "Your email address" is definitely not an input field or " <EMAIL REMOVED> ". The other camp thinks that definition lists are the closest thing that HTML has for name-value pairs.
I've seen them used in forms as a way of wrapping labels and fields to help with layout that is more meaningful than divs and spans. Again, that boils down to which camp you are in and I go with divs myself.

----------------------------------------
From: "Elle" < <EMAIL REMOVED> >
Sent: 18 February 2011 00:15
To: <EMAIL REMOVED>
Subject: SPAM-LOW: [WebAIM] Definition Lists Within Forms

A question came up during a code standards meeting today, and I was asked
about the impact to accessibility. The development team wanted to use a
definition list to help categorize form elements, along with labels. I
didn't know of any issues, as long as other rules were followed (fieldsets,
legends, labels, etc.). I can't find any research so far that implies using
definition lists *in addition to *other elements would have any negative
impacts on accessibility. I only find examples where *replacing* a form
element (like a label) with a definition list element would be a bad
decision. So, are there any drawbacks that you guys can see if a person
follows all WCAG 2.0 guidelines and still chooses to contain some related
form elements within a definition list?

Thanks,
Elle

If you want to build a ship, don't drum up the people to gather wood, divide
the work, and give orders. Instead, teach them to yearn for the vast and
endless sea.
- Antoine De Saint-Exupéry, The Little Prince