-
AuthorPosts
-
April 8, 2021 at 2:18 am #1293154
Hi there. I am working on a website for a law firm that needs to be ADA Compliant with navigation of the menus possible via the tab key. I followed the instructions in your earlier support tickets by editing the avia-snippet-megamenu.js file in my child theme; however, i see that only works partially. I have a menu that is 3-tiered. Some of the child-level menu items have children of their own. And the tabbing does not work in that instance. How can that be corrected as I cannot use this theme or menu if it is not accessible. Thanks for your help.
April 11, 2021 at 12:10 am #1293707Hey xfilegirl,
Thank you for your patience, can you link to the thread you found about the edit you tried, I didn’t find it and would like to try it. It sounds like the issue you are having is only with the third child-level menu correct?Best regards,
MikeApril 11, 2021 at 3:43 am #1293710Hi Mike – the solution I had used was in the thread I’ve linked below. But yes, it only works for a two-level menu. In my menu we have three levels and when it comes to a child that has it’s own child the tabbing stops working and the menu closes.
April 13, 2021 at 7:55 am #1294037Hi,
Thank you for the update.
As we stated on the previous thread, the modification there will only work properly on a single level sub menu.
This should open the sub menu on tab focus and hide it back after focusing out on the very last menu item in the list. This should work properly on items with single sub menu, but not on items with multiple levels of child menu items.
What happens when you remove this block of code?
sublist.find('li:last-child').on('focusout', function () { sublist.stop().animate({ opacity: 0 }, function () { sublist.css({ visibility: 'hidden' }); }); });
Please toggle or temporarily disable the Enfold > Performance > File Compression settings after changing the file.
Best regards,
IsmaelApril 13, 2021 at 4:11 pm #1294155Yes, I did read that it wouldn’t work for multiple child levels, but it was the only solution I could find for the menu’s accessibility issue so I started with that hoping I’d be able to find help for the next part of the issue.
Removing that code makes none of the menus close and they overlap each other. See screenshot link attached.
Thanks for your help – I appreciate it.
April 15, 2021 at 10:52 am #1294534Hi,
Thank you for following up.
After this block of code, we may need to check if there is still an element or another menu item next to the parent container, which is the currentItem or the li tag, and add a function that will manually focus that menu item.
currentLink.on('focus', function () { sublist.stop().css({ visibility: 'visible' }).animate({ opacity: 1 });
If you could provide the WP and FTP details, we will try to modify the code and get that behavior to work.
Best regards,
IsmaelApril 15, 2021 at 9:57 pm #1294623Ok, see info below.
April 20, 2021 at 6:56 am #1295430Hi,
Thank you for the info.
Would you mind disabling the server cache? The modifications are not taking effect in the front end, even after we purge the cache. Please include the FTP details in the private field as well.
Best regards,
IsmaelApril 21, 2021 at 4:36 pm #1295847Ok, I have disabled the bluehost cache.
I had already sent the ftp access on my April 15th response but I have copied it in the private content area again below. Thanks.April 23, 2021 at 5:35 am #1296178Hi,
Thank you for the update.
We modified the script in the parent theme and it should be working properly now. Tabbing should open the submenus properly until the last menu item and move on to the next menu item if there is any.
// bind events for dropdown menu dropdownItems.find('li').addBack().each(function() { var currentItem = $(this), sublist = currentItem.find('ul').first(), showList = false; if(sublist.length) { sublist.css({display:'block', opacity:0, visibility:'hidden'}); var currentLink = currentItem.find('>a'); currentLink.on('mouseenter', function() { sublist.stop().css({visibility:'visible'}).animate({opacity:1}); }); currentLink.on('focus', function () { sublist.stop().css({ visibility: 'visible' }).animate({ opacity: 1 }); currentItem.css("z-index", 1000); sublist.find('li:last-child').on('focusout', function () { var parent = sublist.parent(".menu-item"); var nextMenu = parent.next(); var submenu = $(this).parent(".sub-menu"); if(nextMenu) { nextMenu.trigger("mouseenter").focus(); submenu.stop().animate({ opacity: 0 }, function () { submenu.css({ visibility: 'hidden' }); }); return; } sublist.stop().animate({ opacity: 0 }, function () { sublist.css({ visibility: 'hidden' }); }); }); }); currentItem.on('mouseleave', function() { sublist.stop().animate({opacity:0}, function() { sublist.css({visibility:'hidden'}); }); }); } });
Best regards,
IsmaelApril 24, 2021 at 1:40 am #1296426Hi Ismael – thanks for the update. It’s certainly further along than before so thank you; however, it seems to be stopping too early in the menu. I am only able to tab down to Testamentary Trusts under “Areas of Practice> Wills, Trusts & Estates > Estate Planning” and then it shuts down before finishing the menu. Though if you look at the bottom of the browser you can see that it’s still tabbing, it’s just doing it invisibly if that makes sense. It looks like you’re not tabbing but then the next menu will pop open.
It also skips “Administering an Estate” when you’re tabbing the Wills, Trusts and Estates sub-menu.
Also, if a person has started navigating the menu using tabs and then tries to use the mouse after that, all of the menus remain open based on where it stopped when you were tabbing. It’s not resetting itself.
April 26, 2021 at 8:12 am #1296686Hi,
It looks like you’re not tabbing but then the next menu will pop open.
Yes, it will continue to jump to the next item as long as it is available, going through sub menu items first before jumping back to the next parent item. However, it will not focus or scroll to that item and make it visible in the view port if that is what you are expecting. People who are using accessibility tools such as voice prompts or screen readers are usually the ones who will tab through these items, so it is not really necessary to make them visible in the view port.
Also, if a person has started navigating the menu using tabs and then tries to use the mouse after that,
Yes, it is one of the limitations but I am not sure if there is anyone who uses a tab key when they have a mouse. That is time consuming and unnecessary.
You should also consider restructuring your whole menu, limiting the sub menu to first or second level and consider moving some of the navigation to a sub page instead.
There are also third party plugins such as UberMenu or Max Mega Menu if you want to build a more complex menu, which does not rely on deeply nested drop downs.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.