W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2006

a single label where multiple fields follow

From: Antony Tennant <antonytennant@yahoo.co.uk>
Date: Thu, 21 Sep 2006 12:43:46 +0000 (GMT)
Message-ID: <20060921124346.94533.qmail@web86906.mail.ukl.yahoo.com>
To: w3c-wai-ig@w3.org

I would like to get some opinions on the best practise for assigning <label for""> to inputs where there are multiple inputs for example for telephone numbers, sort codes, credit card numbers. I have had a look at the friends of ed book "Web Accessibility" and my understanding is that the title attribute should be used for the additional fields and <th> where possible.

Picking examples from websites, what would the best approach be (assume the fields cannot be changed to a single field)

For a credit card entry that is split across 4 fields, what would be placed in the following titles where below there is "????"
<label for"creditcard">credit card number</label><input type="text" id ="creditcard" title="first 4 digits">&nbsp;<input type="text" title="????">&nbsp;<input type="text" title="????">&nbsp;<input type="text"  title="????">

For a telephone number, would this be acceptable ie the label to the first field that has a title and the sceond field with a title. 
<label for"telephone">telephone number</label><input type="text" id ="telephone" title="area code">&nbsp;<input type="text" title="local number">

For a bank sort code
<label for"sortcode">sort code</label><input type="text" id ="sortcode" title="first 2 digits">&nbsp;<input type="text" title="middle 2 digits">&nbsp;<input type="text" title="last 2 digits">

Any further guidence would be appreciated


Received on Thursday, 21 September 2006 12:44:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:34 UTC