Skip to content

Commit

Permalink
Merge branch 'feature/toggle-aria-expanded' into release/1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
firestar300 committed Mar 21, 2024
2 parents c47c094 + 235681f commit 9c1cfa2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/classes/Toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class Toggle extends AbstractDomElement {

this.initialized = true

el.setAttribute('aria-expanded', 'false')

if (this.target) {
el.addEventListener('click', this._handleClick)
} else if (!this.target && onClick) {
Expand Down Expand Up @@ -113,6 +115,7 @@ class Toggle extends AbstractDomElement {
this.initialized = false

this.reset()
el.removeAttribute('aria-expanded')

if (onClick) {
el.removeEventListener('click', onClick)
Expand Down

0 comments on commit 9c1cfa2

Please sign in to comment.