From e7ac3449c1bb65688c4acf0390f6b707fc7d90d3 Mon Sep 17 00:00:00 2001 From: Patrick Cartlidge Date: Thu, 9 May 2024 13:50:20 +0100 Subject: [PATCH] Add documentation for 'id' to accordion component The extra documentation for the 'id' attribute that was present in the Nunjucks options table for the accordion has been added to the 'How It Works Section'. This is because if a user is just using the HTML of the accordion component, then they might not encounter the additional documentation provided for the 'id' attribute. This addresses issue #1073. --- src/components/accordion/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/accordion/index.md b/src/components/accordion/index.md index 0791edeec8..e060c46a18 100644 --- a/src/components/accordion/index.md +++ b/src/components/accordion/index.md @@ -65,6 +65,8 @@ There are 2 ways to use the accordion component. You can use HTML or, if you’r The accordion component uses JavaScript. When JavaScript is not available, users will see all the content displayed with the section labels as headings. +If you are using HTML, you must add an 'id' attribute to the parent div of the accordion. It must be unique across the service's domain to maintain the persistent expanded state of the accordion + ### Section heading buttons An accordion will usually start with all sections hidden. To show a section, the user can interact anywhere in the heading button.