Skip to content

Commit

Permalink
Fixed keyboard handler for panels
Browse files Browse the repository at this point in the history
Closed #19
  • Loading branch information
nico3333fr authored Mar 24, 2017
1 parent 8e37d98 commit b84cb1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jquery-accessible-accordion-aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
};

Accordion.prototype.keydownPanelEventHandler = function (e) {
var $panel = $(e.target);
var $panel = $(e.target).closest(this.options.panelsSelector);
var $button = $('#' + $panel.attr('aria-labelledby'));
var $firstButton = this.$wrapper.find(this.options.buttonsSelector).first();
var $lastButton = this.$wrapper.find(this.options.buttonsSelector).last();
Expand All @@ -230,6 +230,7 @@

if ($target !== null) {
this.goToHeader($target);
e.preventDefault();
}
};

Expand Down

0 comments on commit b84cb1d

Please sign in to comment.