WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Field labels

for

From: Tim Harshbarger
Date: Mar 10, 2004 7:32AM


Allison and Julian,

Another method for labeling fields is the title attribute.

<input type="text" name="address2" title="Address 2" />

In this case, a non-visual browser, such as a screen reader, would provide
the title attribute information. -- at least, that is my understanding.

However, for grouping a number of logically related fields, I think Julian
is right to suggest using the fieldset element.

The question is would something along the lines of:

<fieldset>
<legend>Expiration Date</legend>
<input type="text" name="month" />
/
<input type="text" name="year" />
</fieldset>

Provide enough information to the user to figure out what they need to
enter.

Perhaps, with the right visual cues, someone looking at the page may know
what to enter.

I am uncertain that an auditory rendering of the visual cues may assist
someone using a screen reader though.

In JAWS, it would be rendered like this -- "Expiration Date edit".

In this case, I think it helps to have some kind of label to indicate that
all you want is the month. Either that or I would suggest using a combobox
with a list of the months. That may also clarify what information is being
requested.

Tim