WebAIM - Web Accessibility In Mind

E-mail List Archives

textbox in table cell

for

From: Lee, Samson (HRSA) [C]
Date: Mar 26, 2008 8:20AM


I have a data table, which has some textboxes like this:

<table>
<tr>
<th scope="col">Diagnosis</th>
<th scope="col">Level 1</th>
<th scope="col">Level 2</th>
<th scope="col">Level 3</th>
</tr>
<tr>
<th scope="row">Heart Disease</th>
<td><input type="text" size="3" id="tbHLevel1" /></td>
<td><input type="text" size="3" id="tbHLevel2" /></td>
<td><input type="text" size="3" id="tbHLevel3" /></td>
</tr>
<tr>
<th scope="row">Lung Disease</th>
<td><input type="text" size="3" id="tbLLevel1" /></td>
<td><input type="text" size="3" id="tbLLevel2" /></td>
<td><input type="text" size="3" id="tbLLevel3" /></td>
</tr>
...etc.
</table>

My question: <td>s are all accessible because row headers and column
headers are all set. But does this also automatically make the textboxes
inside the <td>s accessible? If not, how do correct this? Each textbox
has to be tied to two "labels" (one column header, one row header), so I
don't think I can use the <label> tag...