Created
May 16, 2012 11:48
-
-
Save sumitasok/2709779 to your computer and use it in GitHub Desktop.
Form fields getting Accessible
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> | |
<fieldset> | |
<legend>Form header</legend> | |
<! this above fieldset legend should have the text explaining the forms purpose > | |
<label for="id_of_related_input_field">Text corresponding to input field</label> | |
<input id="id_of_related_input_field" type="..." /> | |
<! have label close to input, have for(label) and id(input) same for identification by screen reader, prefer this way over nesting input under label > | |
<fieldset> | |
<legend>Radio button Question Text</legend> | |
<label for="radio_select_1"> | |
<input id="radio_select_1" type='radio' value='...'> | |
</fieldset> | |
<! nest radio buttons, drop boxes and check boxes under fieldset and have legend explaining the inputs question > | |
</fieldset> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment