WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Definition Lists Within Forms

for

From: Sailesh Panchang
Date: Feb 18, 2011 7:51AM


Elle,
To group form controls with labels one may use fieldset/legend ... if
the group of form controls have a common (visible) text label that may
be marked up as a legend.
Sometimes some may prefer to place an h<n> tag to mark up different
sections of a longish form.
The above markup is sufficient to expose structure and data relationships.
A 2-column table is also used for layout to hold label element and
form controls.
But I cannot see why a list or a definition list should be used to
mark up form controls and labels ... unless the intent is to use the
list tag for their default indenting / styling abilities. That is
certainly not recommended and is a WCAG failure.
Sailesh Panchang


On 2/17/11, Elle < <EMAIL REMOVED> > wrote:
> 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
>