From ef991962d52152065e600134d837c1d3dd87eb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Mon, 16 Oct 2023 21:37:36 +0200 Subject: [PATCH 1/2] Doc: add expanded accordion explanation --- site/content/docs/5.3/components/accordion.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site/content/docs/5.3/components/accordion.md b/site/content/docs/5.3/components/accordion.md index 227d11a8690a..f6d881779594 100644 --- a/site/content/docs/5.3/components/accordion.md +++ b/site/content/docs/5.3/components/accordion.md @@ -11,7 +11,7 @@ toc: true ## How it works -The accordion uses [collapse]({{< docsref "/components/collapse" >}}) internally to make it collapsible. To render an accordion that's expanded, add the `.open` class on the `.accordion`. +The accordion uses [collapse]({{< docsref "/components/collapse" >}}) internally to make it collapsible. {{< callout info >}} {{< partial "callouts/info-prefersreducedmotion.md" >}} @@ -21,6 +21,10 @@ The accordion uses [collapse]({{< docsref "/components/collapse" >}}) internally Click the accordions below to expand/collapse the accordion content. +To render an accordion that's expanded by default: +- add the `.show` class on the `.accordion-collapse` element. +- drop the `collapse` class from the `.accordion-button` element and set its `aria-expanded` to `true`. + {{< example >}}
From 9715209d30115ff068883ea87391a65f687876ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Fri, 20 Oct 2023 14:05:32 +0200 Subject: [PATCH 2/2] Update site/content/docs/5.3/components/accordion.md Co-authored-by: Louis-Maxime Piton --- site/content/docs/5.3/components/accordion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/5.3/components/accordion.md b/site/content/docs/5.3/components/accordion.md index f6d881779594..8b22686ad50f 100644 --- a/site/content/docs/5.3/components/accordion.md +++ b/site/content/docs/5.3/components/accordion.md @@ -23,7 +23,7 @@ Click the accordions below to expand/collapse the accordion content. To render an accordion that's expanded by default: - add the `.show` class on the `.accordion-collapse` element. -- drop the `collapse` class from the `.accordion-button` element and set its `aria-expanded` to `true`. +- drop the `.collapsed` class from the `.accordion-button` element and set its `aria-expanded` attribute to `true`. {{< example >}}