use a instead of h6 in navigation

this makes focusing and selecting in assistive technologies easier
This commit is contained in:
Andreas Gohr 2017-02-22 12:12:04 +01:00
commit 06938c6d7c
3 changed files with 31 additions and 29 deletions

View file

@ -74,10 +74,11 @@ 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')
.attr('tabindex', '0')
.text(text)
.wrapInner('<span class="lbl">')
.prepend($icon)
@ -103,8 +104,9 @@ jQuery(function () {
* Initialize the open/close toggling of menu entries
*/
const initMenuHandling = function () {
$nav.on('click keypress', 'h6', function () {
$nav.on('click', 'a', function (e) {
toggleNav(jQuery(this));
e.preventDefault();
});
};