DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Design

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 04-28-2006, 01:35 PM   #1
dacoyle
Member
 
dacoyle's Avatar
 
Join Date: Aug 2005
Location: Arlington, VA (across the river from Washington, DC)
Posts: 560
Default <label> for forms

I've been using <label> for form inputs for a number of years now, but it's only been recently that I've fully understood that <label> is as important for forms as "alt" is for images when it comes to screen text readers.

This is probably obvious to many of you, but for the benefit of some others here's a brief explanation. Glad to go in to more detail if there's a need.

The <label> helps identify an input element for text readers. Easy example:

Give us your e-mail [ ]

The code would be <label for="email">Give us your e-mail</label><input yada yada id="email" />

The <label> ties the text to the id "email" in the form input.

Sometimes, an input doesn't have associated text. Recent example I coded at work; a Search box for my work site that is just a text box and a Search button. To label the box, I wrote a class in my css:

.hidetext {display: none;}

So before the input box, I included the following code:

<span class="hidetext"><label for="searchtext">Type search text here</label></span>

That's just the basics; if anyone needs more info (or can expand on the topic) let me know.

FYI, an easy way to test pages with forms is the Cynthia validator. I don't have the URL because there's a command on the Firefox Web Developer Tools (Tools > Validate Section 508) that runs a published page thru Cynthia. Not as handy as Validate Local for the W3C validator, but still useful.

   
__________________
Dennis
dacoyle is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
protecting online forms john_b Web Site Building & Maintenance 6 03-10-2007 05:45 AM
Freelancer boggled by IRS forms rbb Business Matters 1 08-28-2006 09:44 AM
Learning to do Forms dthomsen8 Web Site Building & Maintenance 4 04-13-2006 08:27 AM
Bitmap Label Maker Andrew B. Images 1 11-18-2005 06:51 AM
Acrobat 6 (and 7) use with forms DTP Guy Print Production & Automation 5 03-21-2005 12:26 AM


All times are GMT -8. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Contents copyright 2004–2019 Desktop Publishing Forum and its members.