WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: want to know/understand theimpact due to usage of hidden labels.

for

From: Jon Gunderson
Date: Jul 14, 2006 8:10AM


I would recommend using CSS aboslute positioning and position
the label off screen. Screen readers are more more honoring
"display: none" and "visibility: hiddeen" so this may cause
problems in the future or with other screen readers.

Suggested markup:

<label style="position: absolute; top: -20em; left
-200em;">...</label>

This will render the label off screen, but it still
technically visible, even though a graphical browser rendering
will not render it.

Jon

---- Original message ----
>Date: Thu, 13 Jul 2006 21:21:31 -0700 (PDT)
>From: Shrirang Sahasrabudhe < <EMAIL REMOVED> >
>Subject: [WebAIM] want to know/understand the impact due to
usage of hidden labels.
>To: <EMAIL REMOVED>
>
>Hi,
> I have created a form with a specific layout..
> every form field is put inside a table having 1 row and 3
columns.
> The first column contains the label,
> the second column contains * in case of mandatory fields
> and the last column contains the input box&
> the label is appropriately associated with the input box
using for attribute..
> as the * is not the part of text on the label it is not
read by JAWS..
> in order to fix the problem; I used a hidden label and
placed it in the first column; the text on the hidden label
includes * wherever appropriate.
> This solution is working..
> I would like to know whether this technique is fine or has
any side effects?
> <snip>
> <table rows=2 cols=3>
> <tr>
> <td><div style="width: 0px; height: 0px; visibility: hidden">
> <label for=txt1> user name* </label>
> </div>
> <label> user name </label>
> </td><td> * </td><td>
> <input type=text id=txt1> </td>
> </tr>
> <tr>
> <td>
> <label> password </label>
> < div id="password0" style="width: 0px; height: 0px;
visibility: hidden">
> <label for=passwd> password* </label>
> </div>
> </td>
> <td>*</td>
> <td><input type=password id=passwd></td>
> </tr>
> </table>
> </snip>thanks
>
>
>
>***********************************************************
>If you try, you risk failure. If you don't, you ensure
it....I try.
>Shrirang Sahasrabudhe,
>Pune, India.
>Phone: 0091-020-4227558.
>
>---------------------------------
>Yahoo! Music Unlimited - Access over 1 million songs.Try it
free.
>
>
>


Jon Gunderson, Ph.D.
Director of IT Accessibility Services
Campus Information Technologies and Educational Services (CITES)
and
Coordinator of Assistive Communication and Information Technology
Disability Resources and Education Services (DRES)

Voice: (217) 244-5870
Fax: (217) 333-0248
Cell: (217) 714-6313

E-mail: <EMAIL REMOVED>

WWW: http://cita.rehab.uiuc.edu/
WWW: https://netfiles.uiuc.edu/jongund/www/