Radio buttons allow users to select exactly one option from a visible list.
- Users should be able to tap on or click on either the text “label” or the radio button to select or deselect an option.
- Options that are listed vertically are easier to read than those that are listed horizontally. Horizontal listings can make it difficult to tell which label pertains to which radio button.
- Use caution if you decide to set a default value. Setting a default value can discourage users from making conscious decisions, seem pushy, or alienate users who don’t fit into your assumptions. If you are unsure, leave nothing selected by default.
<div id="filters" class="filters is-open" style="border: none; padding: 20px;">
<legend class="label" for="citations">Citations</legend>
<label>If more than one citation is entered:</label>
<input type="radio" id="citation_require_all_false" name="ao_citation_require_all" value="false" checked>
<label for="citation_require_all_false">Show cases citing any of them</label>
<input type="radio" id="citation_require_all_true" name="ao_citation_require_all" value="true">
<label for="citation_require_all_true">Show cases citing all of them</label>
</div>
<div id="filters" class="filters is-open" style="border: none; padding: 20px;">
<legend class="label" for="citations">Citations</legend>
<label>If more than one citation is entered:</label>
<input type="radio" id="citation_require_all_false" name="ao_citation_require_all" value="false" checked>
<label for="citation_require_all_false">Show cases citing any of them</label>
<input type="radio" id="citation_require_all_true" name="ao_citation_require_all" value="true">
<label for="citation_require_all_true">Show cases citing all of them</label>
</div>
/* No context defined. */