WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Field labels

for

From: Jared Smith
Date: Mar 10, 2004 10:11AM


We've found that Window Eyes does not read the label if the height
and width are set to 0 pixels. I'd suggest leaving height and width
to 1 pixel to catch this user agent. The following seems to work
(we're still testing):

.hidden-label
{
position:absolute;
left:0px
top:-100px;
width:1px;
height:1px;
overflow:hidden;
}

This virtually hides the label (it takes up one pixel) and moves it
100 pixels above the top of the page. If styles are turned off, the
label will appear in the normal context of the page.

Jared Smith
WebAIM (Web Accessibility In Mind)
Center for Persons with Disabilities
Utah State University



***************
On Wednesday, March 10, 2004 you sent:
> A better way is to use the following so that Jaws, and other screen readers
> which apply stylesheets will actually read.

> .hidden{
> height: 0; /* show any descriptive text in a link only in speech
> browsers, hide in all visual browsers. */
> overflow: hidden;
> position: absolute; /* for the benefit of IE5 Mac */
> width: 0;
> }




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