Skip to content

Commit

Permalink
fix(doc): add checks & radios without labels (#1228)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahiss authored May 3, 2022
1 parent e3125b2 commit 94ce2c8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion site/content/docs/5.1/forms/checks-radios.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,19 @@ Put your checkboxes, radios, and switches on the opposite side with the `.form-c
</div>
{{< /example >}}

<!-- Boosted mod: don't promote "without label" -->
## Without labels

Omit the wrapping `.form-check` for checkboxes and radios that have no label text. Remember to still provide some form of accessible name for assistive technologies (for instance, using `aria-label`). See the [forms overview accessibility]({{< docsref "/forms/overview#accessibility" >}}) section for details.

{{< example >}}
<div>
<input class="form-check-input" type="checkbox" id="checkboxNoLabel" value="" aria-label="...">
</div>

<div>
<input class="form-check-input" type="radio" name="radioNoLabel" id="radioNoLabel1" value="" aria-label="...">
</div>
{{< /example >}}

## Toggle buttons

Expand Down

0 comments on commit 94ce2c8

Please sign in to comment.