Visual Example
...
Acceptance Criteria
Checkboxes Radio buttons should be used when one or more options only one option from a group can be selected.
As a screen reader user I should be provided with a form label for every form control.
...
As a screen reader and keyboard only user I should be able to use the TAB key up/down ↑/↓ or left/right ←/→ arrows on the keyboard to navigate between checkboxesselect an option.
As a screen reader and keyboard only user I should be able to use the Spacebar TAB key on the keyboard to check/uncheck a checkboxto move to the next form element.
...
Markup and Code
Code Block | ||
---|---|---|
| ||
<fieldset> <legend>I enjoy the following activities:</legend> <input id="hiking" type="checkbox" name="toppings" value="hiking"> <label for="hiking">Hiking</label><br> <input id="biking" type="checkbox" name="toppings" value="biking"> <label for="biking">Biking</label><br> <input id="running" type="checkbox" name="toppings" value="running"> <label for="running">Running</label><br> <input id="dancing" type="checkbox" name="toppings" value="dancing"> <label for="dancing">Dancing</label> </fieldset> |
...