mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Re-add ACTION_LONG_CLICK for Android a11y (#5330)
This commit is contained in:
parent
d800095721
commit
eb4d823557
@ -278,9 +278,19 @@ class AccessibilityBridge extends AccessibilityNodeProvider implements BasicMess
|
||||
}
|
||||
switch (action) {
|
||||
case AccessibilityNodeInfo.ACTION_CLICK: {
|
||||
// Note: TalkBack prior to Oreo doesn't use this handler and instead simulates a
|
||||
// click event at the center of the SemanticsNode. Other a11y services might go
|
||||
// through this handler though.
|
||||
mOwner.dispatchSemanticsAction(virtualViewId, Action.TAP);
|
||||
return true;
|
||||
}
|
||||
case AccessibilityNodeInfo.ACTION_LONG_CLICK: {
|
||||
// Note: TalkBack doesn't use this handler and instead simulates a long click event
|
||||
// at the center of the SemanticsNode. Other a11y services might go through this
|
||||
// handler though.
|
||||
mOwner.dispatchSemanticsAction(virtualViewId, Action.LONG_PRESS);
|
||||
return true;
|
||||
}
|
||||
case AccessibilityNodeInfo.ACTION_SCROLL_FORWARD: {
|
||||
if (object.hasAction(Action.SCROLL_UP)) {
|
||||
mOwner.dispatchSemanticsAction(virtualViewId, Action.SCROLL_UP);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user