Skip to content

Commit

Permalink
Resolve ARIA role bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jshjohnson committed Mar 28, 2017
1 parent 7552882 commit 779d2e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/scripts/src/choices.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ class Choices {
this.containerOuter.classList.add(this.config.classNames.openState);
this.containerOuter.setAttribute('aria-expanded', 'true');
this.dropdown.classList.add(this.config.classNames.activeState);
this.dropdown.setAttribute('aria-expanded', 'true');

const dimensions = this.dropdown.getBoundingClientRect();
const dropdownPos = Math.ceil(dimensions.top + window.scrollY + dimensions.height);
Expand Down Expand Up @@ -671,6 +672,7 @@ class Choices {
this.containerOuter.classList.remove(this.config.classNames.openState);
this.containerOuter.setAttribute('aria-expanded', 'false');
this.dropdown.classList.remove(this.config.classNames.activeState);
this.dropdown.setAttribute('aria-expanded', 'false');

if (isFlipped) {
this.containerOuter.classList.remove(this.config.classNames.flippedState);
Expand Down

0 comments on commit 779d2e0

Please sign in to comment.