From: ZhangChengLin <469946668@qq.com> Date: Mon, 5 Jun 2023 15:02:46 +0000 (+0800) Subject: add a base class style display for toggle buttons X-Git-Tag: v5.3.1~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c7f888c1ec667119c6a811ed247aaa3cd539fed;p=thirdparty%2Fbootstrap.git add a base class style display for toggle buttons --- diff --git a/site/content/docs/5.3/components/buttons.md b/site/content/docs/5.3/components/buttons.md index da380c144c..83a61382a3 100644 --- a/site/content/docs/5.3/components/buttons.md +++ b/site/content/docs/5.3/components/buttons.md @@ -178,15 +178,29 @@ Visually, these toggle buttons are identical to the [checkbox toggle buttons]({{ Add `data-bs-toggle="button"` to toggle a button's `active` state. If you're pre-toggling a button, you must manually add the `.active` class **and** `aria-pressed="true"` to ensure that it is conveyed appropriately to assistive technologies. {{< example >}} - - - +

+ + + +

+

+ + + +

{{< /example >}} {{< example >}} -Toggle link -Active toggle link -Disabled toggle link +

+ Toggle link + Active toggle link + Disabled toggle link +

+

+ Toggle link + Active toggle link + Disabled toggle link +

{{< /example >}} ### Methods diff --git a/site/content/docs/5.3/forms/checks-radios.md b/site/content/docs/5.3/forms/checks-radios.md index 13a5091ad6..a18ab38c2b 100644 --- a/site/content/docs/5.3/forms/checks-radios.md +++ b/site/content/docs/5.3/forms/checks-radios.md @@ -250,18 +250,25 @@ Create button-like checkboxes and radio buttons by using `.btn` styles rather th {{< example >}} -{{< /example >}} -{{< example >}} -{{< /example >}} -{{< example >}} {{< /example >}} +{{< example >}} + + + + + + + + +{{< /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 >}} @@ -282,6 +289,20 @@ Visually, these checkbox toggle buttons are identical to the [button plugin togg {{< /example >}} +{{< example >}} + + + + + + + + + + + +{{< /example >}} + ### Outlined styles Different variants of `.btn`, such at the various outlined styles, are supported.