-
Notifications
You must be signed in to change notification settings - Fork 30
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
SHIFT+TAB through main navigation doesn't hide the previous menu. #31
Comments
Hey @LaserLag thanks for the feedback! I haven't been able to reproduce this. Is this still an issue for you? If so can you please provide a link to the site you are experiencing this on? Thank you! |
I am having the same issue. Haven's seen this behavior before. This is a multi-site configuration using a theme builder navigation menu. It is also happening on other standard WordPress sites with standard header navigation that I manage. In development. Only plugin active is Divi Accessibility. WordPress 5.8.1, Divi 4.11.3. URL is https://www.abatonweb.com Also can be seen on https://usbhof.org - Standard WordPress site and navigation menu. Happens in Chrome and MS Edge browsers |
We have the same issue when navigating backwards with Shift+Tab |
Having the same issue. Here's my little emergency fix, if anyone needs it in the meantime (it's not great, but it work):
|
@MomokoSanchez @joelhsmith @ramseyba @LaserLag Found a fix for this. BACKUP FILE BEFORE EDITING Edit dropdown_keyboard_navigation.min.js found in /wp-content/plugins/divi-accessibility-master/public/partials/js Remove .is(":last-child") Save The menu will open and then close as you navigate with SHIFT+TAB |
@stewartsavage this works for the shift tabbing closing the submenus but also stops the tabbing down through the submenu links. |
From my experience, you could not SHIFT + TAB (navigate backwards) through
submenus with the change or without. You could only navigate backwards
through the parent menu items and then you would navigate forward through
any submenus which are available.
This is the same behavior that I see in other themes.
Stewart Savage
***@***.***
530-392-8324
https://www.abatonconsulting.com
…On Thu, Apr 27, 2023 at 9:20 AM William Weaver ***@***.***> wrote:
@stewartsavage <https://github.com/stewartsavage> this works for the back
tabbing but also stops the navigating down through the submenu items.
—
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWEGWB5C66NWLL2DNYFEXETXDKME3ANCNFSM4P6ULIPQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That is what I found also. What I meant was removing that piece of the code stopped the tab down into the submenus. So I could only tab across the main menu links. The submenu dropdown would open but hitting tab just went to the next top level menu link rather than going down the submenu links. I have a function that I was able to use in the child theme functions.php file but it is not formatting it here correctly when I try to paste it in. |
I tested my changes on two different sites. Both are working as expected.
However, I did have some trouble with the SiteGround optimization plugin
combining javascript files. It caused the accessibility plugin to break
completely.
Will give your code a try.
Thanks for sharing.
On another note, did you have any solutions for the search box not closing
when SHIFT+TAB through the navigation bar? Does your code fix that too?
Stewart Savage
***@***.***
530-392-8324
https://www.abatonconsulting.com
…On Thu, Apr 27, 2023 at 12:46 PM William Weaver ***@***.***> wrote:
That is what I found also. What I meant was removing that piece of the
code stopped the tab down into the submenus. SO I could only tab across the
main menu links. The submenu dropdown would open but hitting tab just went
to the next top level menu link rather than go down the submenu links.
Here is the function that I used to make it work for me.
`function ghi_shift_tab_main_menu_dropdown_close() {
?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
var $mainMenu = $( "#menu-main-menu" );
var $topButtons = $mainMenu.children( ".menu-item" );
$mainMenu.on( "focus", "> .menu-item > a", function( event ) {
$topButtons.not( $( this ).parent() ).removeClass( "et-hover" );
} );
} );
</script>
<?php
}
add_action( 'wp_footer', 'ghi_shift_tab_main_menu_dropdown_close', 100 );`
—
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWEGWB2GR6MU5QKZKTHWWGTXDLEJ3ANCNFSM4P6ULIPQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
You are very welcome. I just tested the search opening and it does close with shift + tab. |
Navigating backwards through main navigation with SHIFT+TAB doesn't hide the previous menu. It ends up looking like this:
Navigating forward through the menus with TAB works fine.
The text was updated successfully, but these errors were encountered: