From bed1717f373c6e3a610f30a3c5f090d401b05b74 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 22 Feb 2017 11:48:17 +0100 Subject: [PATCH] make sidebar headers toggable via keyboard --- js/sidebar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/sidebar.js b/js/sidebar.js index fd2c9b2..8248b98 100644 --- a/js/sidebar.js +++ b/js/sidebar.js @@ -77,6 +77,7 @@ jQuery(function () { const $toggler = jQuery('
') .attr('role', 'heading') .attr('aria-level', '2') + .attr('tabindex', '0') .text(text) .wrapInner('') .prepend($icon) @@ -102,7 +103,7 @@ jQuery(function () { * Initialize the open/close toggling of menu entries */ const initMenuHandling = function () { - $nav.on('click', 'h6', function () { + $nav.on('click keypress', 'h6', function () { toggleNav(jQuery(this)); }); };