Back to home
Checkboxes and keyboard use
Operation
- TAB to focus on checkbox options
- Focus appears on first checkbox option
- TAB to next checkbox
- SHIFT + TAB to previous checkbox
- Select one or more checkboxes using SPACE BAR
Example
Code sample
<form class="example" action="#">
<fieldset>
<legend>Favourite colors?</legend>
<div>
<input type="checkbox" id="red" name="red">
<label for="red">red</label>
</div>
<div>
<input type="checkbox" id="green" name="green">
<label for="green">green</label>
</div>
<div>
<input type="checkbox" id="blue" name="blue">
<label for="blue">blue</label>
</div>
<div>
<input type="checkbox" id="yellow" name="yello">
<label for="yellow">yellow</label>
</div>
</fieldset>
</form>
Bottom of page - Back to home