WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: urgent sample of good code

for

From: James Nurthen
Date: Feb 5, 2013 3:33PM


If you can't do fieldset/legend due to styling and/or incompatibilities
with a table-based layout you could see if the aria role of group (with a
corresponding aria-labelledby) would work for you.

i.e.

<table role="presentation">
....
<tr role="group" aria-labelledby="questionX">
<td role="presentation" id="questionX">Question Text?</td>
<td role="presentation"><input type="radio" aria-label="1"></td>
<td role="presentation"><input type="radio" aria-label="2"></td>
<td role="presentation"><input type="radio" aria-label="3"></td>
<td role="presentation"><input type="radio" aria-label="4"></td>
<td role="presentation"><input type="radio" aria-label="5"></td>
</tr>
....
</table>

Note: I haven't tested this and I'm not sure this is the exact thing you
want - but this should work.
Additional note: role="presentation" shouldn't be necessary on the TD
elements as it should inherit from the table, but IE seems to leave
singleton gridcell elements if you don't do this.

Regards,
James

On Tue, Feb 5, 2013 at 5:18 AM, Corbett, James
< <EMAIL REMOVED> >wrote:

> Hmmm, I've been testing our external apps for the past year and a half and
> haven't seen a suitable working example.
>
> j.
>
>
>