[Bug][a11y] Three-dot menu is reopened when double tapped anywhere outside the opened menu #3584
Comments
I get a similar issue on my phone - if I double-tap the three-dot menu button, it opens twice (you have to complete the double-tap before the menu opens, a slower device probably helps). Two separate taps outside the menu are needed to close both. |
I think the first issue mentioned is actually the correct way to respond to a double tap, when a button is selected. The official documentation mentions:"When the focus reaches an item you'd like to select, double-tap anywhere on the screen to select the focused item" (https://support.google.com/accessibility/android/answer/6006598?hl=en). The second issue mentioned is that due to the above functionality, after a double tap, the button still has focus and has the same onClickListener, and if you double tap it another settings pop-up is shown. There are three approaches to fix this :
Which one would be the preferred approach? |
I think this is more of an eng ask of how they want to fix the bug? /cc @boek |
As a regular screen reader user, dismissing the menu if already open is what I expect, since most applications do this. |
5674: For #3584 - Check if menu is open before showing a new one r=sblatz a=Mugurell Add a simple check for if the menu is showing depending on which we will know not to construct and show a new menu. This check is to be done by both the "Open tabs menu" and the "Home menu" ### Pull Request checklist <!-- Before submitting the PR, please address each item --> - [x] **Quality**: This PR builds and passes detekt/ktlint checks - [x] **Tests**: This PR does not includes tests as it only contains small changes in not yet tested components - [x] **Screenshots**: This PR does not include screenshots because there are no UI changes, just small behavior ones which are easy to test. - [x] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) ### After merge - [ ] **Milestone**: Make sure issues finished by this pull request are added to the [milestone](https://github.com/mozilla-mobile/fenix/milestones) of the version currently in development. ### To download an APK when reviewing a PR: 1. click on Show All Checks, 2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark, 3. click on the "Fenix - assemble" task, then click "Run Artifacts". 4. the APK links should be on the left side of the screen, named for each CPU architecture Co-authored-by: Petru Lingurar <petru.lingurar@softvision.ro>
Could have implemented this check (if menu is showing) inside the show() method of BrowserMenu but this would mean the client (us) would go to the process of building a new menu and then trying to have it displayed only for this to be ignored by BrowserMenu in a somewhat opaque way. Having this check done as soon as possible offers us full control and avoids the unnecessary steps for building an already shown menu.
Verified as fixed. The settings option is selected by default now when you open the 3 dot menu. |
Closing as per #3584 (comment) |
Steps to reproduce
Expected behavior
Double tapping outside the menu should dismiss the menu.
Actual behavior
The three-dot menu is opened again and again when tapping anywhere outside the menu.
Device information
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: