-
Notifications
You must be signed in to change notification settings - Fork 198
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
Changes to fix touchscreen issues when tapping on top-level nav items. #53
base: gh-pages
Are you sure you want to change the base?
Conversation
The behaviour of mouse-clicks versus touch/tap, is now made consistent. 1. onClick / onTouch of top-level items will toggle the menu under the nav-item 2. on hover showing of menus for top level menu items is removed now.
@majornista Sending this PR on top of gh-pages branch. The testing of the touchscreen related fixes can be done by navigating to
|
Hi @tanu08 - looks good on many counts. Unfortunately there's a regression in desktop versions. Here's a bug report (not exhaustive): testing accessible mega menu updates 2018-03-09 unexpected behavior across most desktop browsers: safari desktop: |
@tanu08 The rationale for supporting a dual behavior for links as top level menu items, where the menu displays on hover and the clicking the menu item with the menu expanded navigates through to the specified With touch browsers, the behavior of differs mainly to ensure that a screen reader user on a touch device can toggle the menu using a click action on the menu item. Clicking an area outside of the menu isn't a viable option for a screen reader user on a touch device. If maintaining support for navigation to the top-level menu items is a requirement on touch devices, one simple solution would be to add the link within an |
@majornista You describe the notion of navigating by clicking a menu item with the menu expanded. Do you have any insights on how well the notion has stood the test of time? I don't believe I've come across it for a while. (@tanu08 comments that adobe.com also went a different direction). That question aside, can you weigh in on the notion of a patch to this library that supports the behavior @tanu08 proposes (i.e. to have this library work the way it does on adobe.com, with no hyperlinks in top-level nav)? There seem to be several related issues in the queue, and several patches that don't fix the issue with android devices. I wonder if this simplification is a reasonable solution, or at least a stop-gap. |
@care4kittens It is probably better practice to toggle submenus with a click, as we do on touch devices, rather than rely on hover. In which case, I'd recommend a separate link within the sub-menu to navigate to any url specified in the top-level header link's href. |
@majornista @care4kittens Thanks for weighing in with your thoughts. I also agree that, navigation of top-level menu links by click(in expanded state) and opening their menus on hover, though works fine on mouse-based interaction, it goes counterproductive on touch-based gestures. @majornista If the above design principle seems fair, then you can take a look at this PR for merging it into main trunk. Let me know your feedback on the patch and if any suggestions to the fix, are also welcome. |
@care4kittens I have fixed the issues you mentioned above re: inconsistency in click behaviour across browsers and the issue with Safari Menu panels not opening. |
…es in subsequent clicks when menu is already open
@majornista @care4kittens I have pushed another commit to |
…er nav item and its previous one is already opened
@tanu08 I just committed a few fixes that seek to address the concerns you have been trying to solve with this PR. Thank you for your contributions. |
The behaviour of mouse-clicks versus touch/tap, is now made consistent.
A detailed analysis of touchscreen and mouse click/hover behaviour across browser/OS environments is captured in a long comment here:
#32