WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: form label question

for

From: Jukka K. Korpela
Date: Aug 8, 2007 5:50AM


On Wed, 8 Aug 2007, Kathleen Ballard wrote:

> Is using display: block to hide the labels and keep
> them available for screen readers a safe/accepted
> practice?

No, because labels and associated markup help far more people than just
screen reader users. Everyone, and especially many cognitively disabled
people, need well-written labels so that they know the meaning of each
field.

I wonder how you expect display: block to hide anything.

> Also, a recent webinar mentioned using the alt or
> title attribute of the form control itself.

That's pointless or worse. If you have good labels, nobody needs such
attributes. If you don't, most people won't perceive any labels.

> This
> would actually allowed giving the screen reader user
> better infromation about the form control. Ex:
> alt="Enter First Name required"

You must have confused attributes with each other. No form field except
image submit button may have an alt attribute, by HTML rules. You probably
mean the title attribute.

> Are both <label> and alt preferred? Or should one be
> chosen over the the other?

Use good label texts and <label> markup to associate them with fields.
That's it. No hassling around with fancy attributes.

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