WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: help with a form please

for

From: Chris Price
Date: Mar 15, 2007 7:10PM


Cheryl Amato wrote:
> I have a form (not my design) that needs be made accessible. You will see by the code that there is a combination of radio buttons and input fields. I have included a bit of the code as that may be easier than any explanation I can give. I've never seen this kind of setup before and am unsure as to how it should be handled. I know that <label> must be added to the input fields especially since they are in different table rows. But what do I do with the radio buttons? They are "sharing" the same text label.
>
>
How about this:

<table><caption>Candidate:</caption>
<tbody>
<tr>
<th scope="row"><input type="radio" name="ctrecipient"
id="ct_acct" value="ct_acct"> <label for="ct_acct">Committee</label></th>
<td><label for="iacct_name">Name:</label></td><td><input
size="25" name="iacct_name" id="iacct_name"></td>
</tr>
<tr><td>or</td></tr>
<tr>
<th scope="row" rowspan="2"><input type="radio"
name="ctrecipient" id="ct_nm" value="ct_nm"> <label
for="ct_nm">Candidate:</label></th>
<td><label for="icand_fname">First
Name:</label></td><td><input size="25" name="icand_fname"
id="icand_fname"></td>
</tr>
<tr>
<td><label for="icand_lname">Last
Name:</label></td><td><input size="25" name="icand_lname"
id="icand_lname"></td>
</tr>
</tbody>
</table>

I've used the input values for id's rather than the names. As far as I
can see, as long as all id's are unique and the label and input id's
match then it should be OK.

I've also tried to make sense of the rows and columns so that the table
is more than a placeholder.

I didn't think it made sense to have 2 tables either.

Kind Regards
--
Chris Price

Choctaw

<EMAIL REMOVED>
http://www.choctaw.co.uk

Tel. 01524 825 245
Mob. 0777 451 4488

Beauty is in the Eye of the Beholder
while Excellence is in the Hand of the Professional

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+- Sent on behalf of Choctaw Media Ltd -+-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Choctaw Media Limited is a company
registered in England and Wales
with company number 04627649

Registered Office:
Lonsdale Partners,
Priory Close,
St Mary's Gate,
Lancaster LA1 1XB
United Kingdom