diff options
author | Patrick H. Lauke <redux@splintered.co.uk> | 2020-07-03 14:34:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 14:34:32 +0300 |
commit | 0a6cf9036c6bc3c5d1c68de971c95b70f5125aca (patch) | |
tree | 92366e89d2165d666fd46e702e219e3ae2f564ec /site/content/docs/5.0/forms | |
parent | 386f9e327e93d98a8b160e5f3a60c2eb70f3c569 (diff) |
Docs: improve/expand button documentation (#31093)
* Docs: improve/expand button documentation
- since we're not doing the disabled cursor thing anymore anyway, remove confusing/unnecessary mention for link-based disabled buttons
- make the disabled toggle example using a link actually follow the preceding advice of also having `tabindex="-1"` and `aria-disabled="true"`
- tweak the link functionality callout to also still mention `aria-disabled` to reinforce the idea
- tweak toggle state description (not just `<button>`s, but also links etc...so just remove mention of `<button>` there; also reinforce accessibility aspect once more)
- add a new callout that cross-references checkbox-based toggles, and what the similarity/difference between them is
- add a matching cross-reference callout to the checkbox-based toggle buttons page
* Update link to now renamed checks-radios.md
Diffstat (limited to 'site/content/docs/5.0/forms')
-rw-r--r-- | site/content/docs/5.0/forms/checks-radios.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/site/content/docs/5.0/forms/checks-radios.md b/site/content/docs/5.0/forms/checks-radios.md index 6d8bdf3860..8de3d43364 100644 --- a/site/content/docs/5.0/forms/checks-radios.md +++ b/site/content/docs/5.0/forms/checks-radios.md @@ -227,6 +227,10 @@ Bootstrap's `.btn` styles can be applied to `<label>`s, to provide checkbox styl <label class="btn btn-primary" for="btn-check-2">Checked</label> {{< /example >}} +{{< callout info >}} +Visually, these checkbox toggle buttons are identical to the [button plugin toggle buttons]({{< docsref "/components/buttons#button-plugin" >}}). However, they are conveyed differently by assistive technologies: the checkbox toggles will be announced by screen readers as "checked"/"not checked" (since, despite their appearance, they are fundamentally still checkboxes), whereas the button plugin toggle buttons will be announced as "button"/"button pressed". The choice between these two approaches will depend on the type of toggle you are creating, and whether or not the toggle will make sense to users when announced as a checkbox or as an actual button. +{{< /callout >}} + ### Radio toggle buttons Toggle buttons can be grouped in a [button group]({{< docsref "/components/button-group" >}}) if needed. |