WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: labels in forms

for

From: Jukka K. Korpela
Date: May 31, 2007 10:50PM


On Fri, 1 Jun 2007, Patrick H. Lauke wrote:

> the for attribute points to a matching id attribute. both are
> machine-readable data, which is not directly exposed to the end user

This is almost nitpicking, but id attribute values may be used in URLs
that refer to specific elements (or locations) on a page, i.e. in fragment
identifiers (#idvalue). URLs in turn may be exposed to users at least in
the browser's location bar or - when mousing over a link - on the status
line.

This _is_ nitpicking when form fields are considered, since there is
hardly any point in referring to a field with a fragment identifier. But
for id attributes in general, it is a good idea to keep them reasonably
readable to humans.

--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/