Last active
August 10, 2017 13:15
-
-
Save chrisdpeters/413d567e1c0aa49b16eb to your computer and use it in GitHub Desktop.
Authoring accessible Web forms http://blog.chrisdpeters.com/authoring-accessible-web-forms/
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
<form action="action.cfm" method="post"> | |
<p> | |
<strong>Your Name</strong><br /> | |
<input type="text" name="yourName" /> | |
</p> | |
<p> | |
<strong>Gender</strong><br /> | |
<input type="radio" name="gender" value="M" /> | |
Male<br /> | |
<input type="radio" name="gender" value="F" /> | |
Female | |
</p> | |
<p> | |
<input type="submit" value="Submit" /> | |
</p> | |
</form> |
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
<form action="action.cfm" method="post"> | |
<div> | |
<label for="your-name">Your Name</label><br /> | |
<input id="your-name" type="text" name="yourName" /> | |
</div> | |
<fieldset> | |
<legend>Gender</legend> | |
<input id="gender-m" type="radio" name="gender" value="M" /> | |
<label for="gender-m">Male</label><br /> | |
<input id="gender-f" type="radio" name="gender" value="F" /> | |
<label for="gender-f">Female</label> | |
</fieldset> | |
<div> | |
<input type="submit" value="Submit" /> | |
</div> | |
</form> |
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
form div { | |
margin: 10px 0; | |
} |
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
<form action="action.cfm" method="post"> | |
<div> | |
<label for="your-name">Your Name</label><br /> | |
<input id="your-name" type="text" name="yourName" /> | |
</div> | |
<div> | |
<strong>Gender</strong><br /> | |
<input id="gender-m" type="radio" name="gender" value="M" /> | |
<label for="gender-m">Male</label><br /> | |
<input id="gender-f" type="radio" name="gender" value="F" /> | |
<label for="gender-f">Female</label> | |
</div> | |
<div> | |
<input type="submit" value="Submit" /> | |
</div> | |
</form> |
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
<form action="action.cfm" method="post"> | |
<div> | |
<strong>Your Name</strong><br /> | |
<input type="text" name="yourName" /> | |
</div> | |
<div> | |
<strong>Gender</strong><br /> | |
<input type="radio" name="gender" value="M" /> | |
Male<br /> | |
<input type="radio" name="gender" value="F" /> | |
Female | |
</div> | |
<div> | |
<input type="submit" value="Submit" /> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment