The Label Tag and JAWS


Using the label tag can help assistive technology know precisely which text belongs to which form element. For instance, JAWS often correctly determines text in one column of a table as being associated with the form elements in the other column. Labeling it takes away all guesswork.

Additionally using the label tag with form elements such as checkboxes and radio buttons makes the corresponding text clickable and thus easier for everyone to use.

The Label Tag's Attribute

Setting the "for" attribute of the label tag to correspond to the "id" attribute of the form element links the two objects together.

Example

The following checkboxes do not have labels associated with them. Attempt to select the checkboxes by clicking the text.

Jeopardy!
Wheel of Fortune
The Price Is Right

Here's the HTML

<p><input type="checkbox" id="jeopDummy" />Jeopardy!<br />
<input type="checkbox" id="wheelDummy" />Wheel of Fortune<br />
<input type="checkbox" id="priceDummy" />The Price Is Right</p>

Now try clicking the text to select these checkboxes, which have associated labels.



Here's the HTML

<p><input type="checkbox" id="jeop" /><label for="jeop">Jeopardy!</label><br />
<input type="checkbox" id="wheel" /><label for="wheel">Wheel of Fortune</label><br />
<input type="checkbox" id="price" /><label for="price">The Price Is Right</label></p>

Notes

I have used JAWS 5.0 and later to develop these instructions; if you have an older version these instructions may or may not be accurate.

Checkboxes are not the only form element that can make use of the label tag.

Websites

Freedom Scientific: www.FreedomScientific.com

Felgall Internet - Displaying HTML Source Code in Web Pages: www.felgall.com/htmlt47.htm

Author Contact

Please direct any questions, comments, thoughts, suggestions or corrections to the author at Jake@JBrownell.com

Disclaimer

All Scripts, Tips and Tricks are provided on an "AS IS" basis without any implied garrentee. User assumes all responsibility for management of his or her software and its associated components.

All trademarks, brands, product ids, etc. mentioned belong to either Freedom Scientific or their respective owners, no claim of ownership is made.

Copyright 2005 J. A. Brownell

Last Updated July 27, 2005


JAWS Scripts, Tips and Tricks

www.JBrownell.com