Radio button accessibility (508 compliance)
Posted
by ferrari fan
on Stack Overflow
See other posts from Stack Overflow
or by ferrari fan
Published on 2010-06-10T17:45:42Z
Indexed on
2010/06/10
18:02 UTC
Read the original article
Hit count: 169
Hi,
If I want to have a question with a "Yes/No" radio button. How do I need to mark up the code so that a screen reader reads the question associated with the "yes/no" selection instead of just reading the "Yes" and "No" labels when the radio buttons are selected?
<span>Did you understand this? (choose one) </span>
<label>
<input type="radio" id="yes_no" name="yes_no" value="Yes" />
Yes
</label>
<label>
<input type="radio" id="yes_no" name="yes_no" value="No" />
No
</label>
Thanks
© Stack Overflow or respective owner