Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aria_mobile_menu.js #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update aria_mobile_menu.js
This fixes keyboard accessibility of mobile hamburger menus when using the Divi Menu module or non-default Divi menus. Old code would click every hamburger icon on the page (and there are multiple). This code only clicks the hamburger icon that you're on.
brianshim authored Dec 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 1b6fdbefcb9ffbf8ebb133275af2e2a30e7c5096
4 changes: 2 additions & 2 deletions public/partials/js/aria_mobile_menu.js
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jQuery(document).ready(function($) {
*/
$('.mobile_menu_bar').keyup(function(event) {
if (event.keyCode === 13 || event.keyCode === 32) {
$('.mobile_menu_bar').click();
$(this).click();
}
});

@@ -43,4 +43,4 @@ jQuery(document).ready(function($) {
}
});

});
});