Last active
August 1, 2017 20:54
-
-
Save 1Copenut/adcfe268bac6df307a769d70aeb35136 to your computer and use it in GitHub Desktop.
a11y - Form - Required radio button group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 id="radio-group-title">A Decent Way to Group Radio Buttons</h1> | |
<form action="#" aria-labelledby="radio-group-title"> | |
<fieldset role="radiogroup" aria-required="true"> | |
<legend>This fieldset is required</legend> | |
<label> | |
<input type="radio" name="test-group" id="test-group-1" required="true" value="true">Yes | |
</label> | |
<label> | |
<input type="radio" name="test-group" id="test-group-2" required="true" value="false">No | |
</label> | |
</fieldset> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment