use a instead of h6 in navigation
this makes focusing and selecting in assistive technologies easier
This commit is contained in:
parent
bed1717f37
commit
06938c6d7c
3 changed files with 31 additions and 29 deletions
|
@ -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();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue