aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick H. Lauke <[email protected]>2020-09-10 08:04:13 +0100
committerGitHub <[email protected]>2020-09-10 08:04:13 +0100
commit42a0f8f0071cf323894af0265a6488c1e56dd63c (patch)
treeac9ef5144cbb3d3dca6bcdb2a5b4e1bf4382f3f6
parent6455c2e8aa024442a9b31c4a7cc5200b76c3d38a (diff)
downloadbootstrap-42a0f8f0071cf323894af0265a6488c1e56dd63c.tar.xz
bootstrap-42a0f8f0071cf323894af0265a6488c1e56dd63c.zip
Docs: (subjectively) nicer looking accordion example (#31137)
* Docs: (subjectively) nicer looking accordion example the use of `.btn-link` currently just looks a bit odd, subjectively (as in v5 we now force the underline to always be there, while in v4 at least it was only on hover/focus). `.btn-light` seems more fitting * Add extra classes for nicer overall look as suggested by @ysds * Tweak accessibility note for accordions and optional keyboard interactions
-rw-r--r--site/content/docs/5.0/components/collapse.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/site/content/docs/5.0/components/collapse.md b/site/content/docs/5.0/components/collapse.md
index a182ab230..349d26da5 100644
--- a/site/content/docs/5.0/components/collapse.md
+++ b/site/content/docs/5.0/components/collapse.md
@@ -76,9 +76,9 @@ Using the [card]({{< docsref "/components/card" >}}) component, you can extend t
{{< example >}}
<div class="accordion" id="accordionExample">
<div class="card">
- <div class="card-header" id="headingOne">
+ <div class="card-header p-0" id="headingOne">
<h2 class="mb-0">
- <button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
+ <button class="btn btn-light btn-block text-left p-3 rounded-0" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</button>
</h2>
@@ -91,9 +91,9 @@ Using the [card]({{< docsref "/components/card" >}}) component, you can extend t
</div>
</div>
<div class="card">
- <div class="card-header" id="headingTwo">
+ <div class="card-header p-0" id="headingTwo">
<h2 class="mb-0">
- <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
+ <button class="btn btn-light btn-block text-left collapsed p-3 rounded-0" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Collapsible Group Item #2
</button>
</h2>
@@ -105,9 +105,9 @@ Using the [card]({{< docsref "/components/card" >}}) component, you can extend t
</div>
</div>
<div class="card">
- <div class="card-header" id="headingThree">
+ <div class="card-header p-0" id="headingThree">
<h2 class="mb-0">
- <button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
+ <button class="btn btn-light btn-block text-left collapsed p-3 rounded-0" type="button" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Collapsible Group Item #3
</button>
</h2>
@@ -127,7 +127,7 @@ Be sure to add `aria-expanded` to the control element. This attribute explicitly
If your control element is targeting a single collapsible element – i.e. the `data-target` attribute is pointing to an `id` selector – you should add the `aria-controls` attribute to the control element, containing the `id` of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.
-Note that Bootstrap's current implementation does not cover the various keyboard interactions described in the [WAI-ARIA Authoring Practices 1.1 accordion pattern](https://www.w3.org/TR/wai-aria-practices-1.1/#accordion) - you will need to include these yourself with custom JavaScript.
+Note that Bootstrap's current implementation does not cover the various *optional* keyboard interactions described in the [WAI-ARIA Authoring Practices 1.1 accordion pattern](https://www.w3.org/TR/wai-aria-practices-1.1/#accordion) - you will need to include these yourself with custom JavaScript.
## Usage