Skip to content

Commit

Permalink
Merge branch 'release/1.4.4' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
firestar300 committed Sep 19, 2023
2 parents 9f79355 + 5e3c6c4 commit 5e35794
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.4.4 - 2023-09-19

- Fix `aria-expanded` attribute value for closedDefault Accordion
- Complete documentation for Accordion

## 1.4.3 - 2023-09-14

- Add `mediaQuery` option to Accordion component
Expand Down
23 changes: 12 additions & 11 deletions examples/accessible-accordion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,15 @@ Accordion.initFromPreset();
### Options

| name | type | default | description |
|-------------------|----------|-----------------------|---------------------------------------------------------|
| `allowMultiple` | boolean | `false` | Allow accordion to open panels at the same time. |
| `closedDefault` | boolean | `false` | If true, all panels are closed by default. |
| `forceExpand` | boolean | `true` | If true, the accordion has at least one panel opened. |
| `hasAnimation` | boolean | `false` | If true, the panel has a slideDown / slideUp animation. |
| `onClose` | function | `null` | Opened panel callback. |
| `onOpen` | function | `null` | Closed panel callback. |
| `panelSelector` | string | `.accordion__panel` | The selector of the panels. |
| `prefixId` | string | `accordion` | The prefix id of the component. |
| `triggerSelector` | string | `.accordion__trigger` | The selector of the trigger buttons. |
| name | type | default | description |
|-------------------|---------------------------|-----------------------|---------------------------------------------------------|
| `allowMultiple` | boolean | `false` | Allow accordion to open panels at the same time. |
| `closedDefault` | boolean | `false` | If true, all panels are closed by default. |
| `forceExpand` | boolean | `true` | If true, the accordion has at least one panel opened. |
| `hasAnimation` | boolean | `false` | If true, the panel has a slideDown / slideUp animation. |
| `mediaQuery` | null or matchMedia object | `null` | Set dropdown for a specific media query. |
| `onClose` | function | `null` | Opened panel callback. |
| `onOpen` | function | `null` | Closed panel callback. |
| `panelSelector` | string | `.accordion__panel` | The selector of the panels. |
| `prefixId` | string | `accordion` | The prefix id of the component. |
| `triggerSelector` | string | `.accordion__trigger` | The selector of the trigger buttons. |
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beapi/be-a11y",
"version": "1.4.3",
"version": "1.4.4",
"description": "Collection of usefull accessible components",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions src/classes/Accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Accordion extends AbstractDomElement {
}

if (closedDefault) {
triggers[index].setAttribute('aria-expanded', 'false')
this.close(panel)
}
})
Expand Down

0 comments on commit 5e35794

Please sign in to comment.