Skip to content

Commit

Permalink
Add documentation for 'id' to accordion component
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
patrickpatrickpatrick committed May 9, 2024
1 parent dfc6e12 commit 467b689
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/accordion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

The 'id' attribute on the the parent div of the accordion is a required attribute. It must be unique across the domain of your service to persist the expanded state of the accordion (the state individual instances of the component persists across page loads using [session storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)).

### 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.
Expand Down

0 comments on commit 467b689

Please sign in to comment.