-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
[a11y][web] Selecting menu items triggers a back navigation #134842
Comments
@chunhtai - please take a look at this |
We do, but we handle it using gesture arena. For tap gesture the inner most one will win.
Should whichever receives the click that also has semantics tap prevent the event from bubbling? |
Updating the priority to match the internal bug mapping |
I'm reverting the fix for the merged clicks for now.
I'm going to have to test this. One issue I've seen before (which is related to the PR that's being reverted) is that screen readers like to click in the middle of things. If we have overlapping nested clickables, I'm not sure if the screen reader would still end up clicking on the child anyway. |
Yes that is something we should test, if they issue a really click instead of calling the onClick method on the div, this issue probably is not limited to flutter. |
This reverts commit 0c1de9b. The commit caused flutter/flutter#134842. I'm going to try again, this time accounting for nested clickables/tappables.
Dropping to P1 as the PR that exacerbated the issue has been reverted. |
This reverts commit 0c1de9b. The commit caused flutter/flutter#134842. I'm going to try again, this time accounting for nested clickables/tappables.
This relands #43620 with a fix for nested tappable nodes. The first PR introduced this regression: flutter/flutter#134842. This PR includes the original PR and a fix for the regression. The fix is to call `stopPropagation` on the "click" event so that it is not handled by the ancestor if the child has already decided to send a `SemanticsAction.tap` to the framework. This ensures that there cannot be more than one `SemanticsAction.tap` sent to the framework. Fixes flutter/flutter#134842
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Raised internally at b/299847356
Issue: Selecting a menu item with semantics enabled, for example through a pop up menu or dropdown menu, triggers a back navigation. This not only dismisses the menu, but also pops the next route from the navigator stack.
Expected: Selecting a menu item with semantics enabled dismisses the menu, but does not trigger another route to be popped from the navigator stack.
Bisected to engine roll: #131897
Bisected to engine commit: flutter/engine#43620
Minimal example for reproduction: https://dartpad.dev/?id=41045409a61245de472cb0083fc94742&channel=master
Screen.Recording.2023-09-15.at.1.44.04.PM.mov
Stack trace before change
Stack trace after change
From the stack trace it looks like a second semantics action is being dispatched and that is causing a second route to be popped from the navigator stack. The first pop that happens in
PopUpMenu
is expectedflutter/packages/flutter/lib/src/material/popup_menu.dart
Lines 341 to 346 in 367f9ea
ModalBarrier
flutter/packages/flutter/lib/src/widgets/modal_barrier.dart
Lines 223 to 233 in 367f9ea
The text was updated successfully, but these errors were encountered: