On 19 Aug 2009, at 16:37, Erickson, Kevin (DOE) wrote:
When making a form in Dreamweaver it puts in id="same as name" in to
every form item. When I take out all the id attributes the form
still works. Why are the id attributes being put in by DW and, more
importantly, is there an accessibility issue if I take them out?
In the case of radio groups — this is a problem, since an id must be
unique per document while every element in a radio group must share a
name.
In the case of everything else…
The id itself doesn't matter. What is important is that there is a
<label> associated with the form control. The best supported means of
creating this association is with the for attribute.
<input type="radio"
name="favourite_pet"
id="favourite_pet_dog"
value="dog">
<label for="favourite_pet_dog">
Dog
</label>
If Dreamweaver is doing a good job, then it will be generating those
labels for you, and removing the id attribute will break things.
Otherwise, you should be adding the labels yourself. Either way, the
id attributes are important.
--
David Dorward
http://dorward.me.uk
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************