Merge branch 'sidebar' into details

* sidebar:
  use a instead of h6 in navigation
  make sidebar headers toggable via keyboard
This commit is contained in:
Andreas Gohr 2017-02-22 13:57:26 +01:00
commit 560d730c9c
3 changed files with 31 additions and 28 deletions

View file

@ -74,7 +74,9 @@ jQuery(function () {
}
// make the new toggler
const $toggler = jQuery('<h6>')
const $toggler = jQuery('<a>')
.addClass('nav')
.attr('href', '#')
.attr('role', 'heading')
.attr('aria-level', '2')
.text(text)
@ -102,8 +104,9 @@ jQuery(function () {
* Initialize the open/close toggling of menu entries
*/
const initMenuHandling = function () {
$nav.on('click', 'h6', function () {
$nav.on('click', 'a', function (e) {
toggleNav(jQuery(this));
e.preventDefault();
});
};