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
-----Original Message-----
From: <EMAIL REMOVED> [mailto: <EMAIL REMOVED> ]
Sent: Wednesday, March 10, 2004 7:46 AM
To: <EMAIL REMOVED>
Subject: RE: Field labels


> -----Original Message-----
> From: Allison Tynan [mailto: <EMAIL REMOVED> ]

> Is it possible to attach invisible field labels? Say for
> example you have
> three fields for an address, instead of labelling each field
> Address 1,
> Address 2 etc, is it possible to provide an invisible label
> for the second
> two fields?

This is an interesting question that I too would like resolved. My version
of the question would be, can a label apply to multiple (but logically
related) fields. For example, I have a form where the user may select a
month and year separately (in a sense, not unlike e-commerce forms where you
specify the month and year of your credit card expiry date). Can a single
label be used to apply to both fields or must each field have its own label?

I am familiar with the <fieldset> tag and maybe that is the one to be used
but I have never been very certain as to how to use it or when to use it.

---------------------------------------------------------
Julian Rickards
Digital Publications Distribution Coordinator
Publications Services Section
Ontario Ministry of Northern Development and Mines
Phone: (705) 670-5608
Fax: (705) 670-5690



----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/


----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/