WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Re: SPAM-LOW: Definition Lists Within Forms

for

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

From: Dawn Budge
Date: Fri, Feb 18 2011 3:21AM
Subject: Re: SPAM-LOW: Definition Lists Within Forms
No previous message | Next message →

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 ADDRESS 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 ADDRESS REMOVED = >
Sent: 18 February 2011 00:15
To: = EMAIL ADDRESS 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

From: Sailesh Panchang
Date: Fri, Feb 18 2011 7:51AM
Subject: Re: Definition Lists Within Forms
← Previous message | No next message

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 ADDRESS 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
>