aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/5.1/forms
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2021-09-13 22:02:37 -0600
committerGitHub <[email protected]>2021-09-13 22:02:37 -0600
commit70533dcdb84484af4320817a4a36b47ddf0e56f9 (patch)
treefc1b9f737f926af54b67eebfb75eb6a27b23b2cf /site/content/docs/5.1/forms
parentfde2544899f6728dea35591741662935d56b0362 (diff)
parentc9af4565fdc13eff025736e574ea10690fd21a39 (diff)
downloadbootstrap-split-vars-maps-import.tar.xz
bootstrap-split-vars-maps-import.zip
Merge branch 'main' into split-vars-maps-importsplit-vars-maps-import
Diffstat (limited to 'site/content/docs/5.1/forms')
-rw-r--r--site/content/docs/5.1/forms/checks-radios.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/site/content/docs/5.1/forms/checks-radios.md b/site/content/docs/5.1/forms/checks-radios.md
index 0f5507f54..efd040de0 100644
--- a/site/content/docs/5.1/forms/checks-radios.md
+++ b/site/content/docs/5.1/forms/checks-radios.md
@@ -102,23 +102,23 @@ Add the `disabled` attribute and the associated `<label>`s are automatically sty
## Switches
-A switch has the markup of a custom checkbox but uses the `.form-switch` class to render a toggle switch. Switches also support the `disabled` attribute.
+A switch has the markup of a custom checkbox but uses the `.form-switch` class to render a toggle switch. Consider using `role="switch"` to more accurately convey the nature of the control to assistive technologies that support this role. In older assistive technologies, it will simply be announced as a regular checkbox as a fallback. Switches also support the `disabled` attribute.
{{< example >}}
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault">
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDefault">
<label class="form-check-label" for="flexSwitchCheckDefault">Default switch checkbox input</label>
</div>
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckChecked" checked>
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckChecked" checked>
<label class="form-check-label" for="flexSwitchCheckChecked">Checked switch checkbox input</label>
</div>
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckDisabled" disabled>
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDisabled" disabled>
<label class="form-check-label" for="flexSwitchCheckDisabled">Disabled switch checkbox input</label>
</div>
<div class="form-check form-switch">
- <input class="form-check-input" type="checkbox" id="flexSwitchCheckCheckedDisabled" checked disabled>
+ <input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckCheckedDisabled" checked disabled>
<label class="form-check-label" for="flexSwitchCheckCheckedDisabled">Disabled checked switch checkbox input</label>
</div>
{{< /example >}}