diff --git a/packages/flutter/lib/src/material/tooltip.dart b/packages/flutter/lib/src/material/tooltip.dart index af7aba9c55b0..12f80d69db0f 100644 --- a/packages/flutter/lib/src/material/tooltip.dart +++ b/packages/flutter/lib/src/material/tooltip.dart @@ -751,7 +751,7 @@ class TooltipState extends State with SingleTickerProviderStateMixin { behavior: HitTestBehavior.opaque, onLongPress: (_triggerMode == TooltipTriggerMode.longPress) ? _handlePress : null, onTap: (_triggerMode == TooltipTriggerMode.tap) ? _handleTap : null, - excludeFromSemantics: _excludeFromSemantics, + excludeFromSemantics: true, child: result, ); // Only check for hovering if there is a mouse connected. diff --git a/packages/flutter/test/material/back_button_test.dart b/packages/flutter/test/material/back_button_test.dart index df7801fb1e6d..09d9fd1d668c 100644 --- a/packages/flutter/test/material/back_button_test.dart +++ b/packages/flutter/test/material/back_button_test.dart @@ -172,7 +172,6 @@ void main() { hasEnabledState: true, isEnabled: true, hasTapAction: true, - hasLongPressAction: true, isFocusable: true, )); handle.dispose(); @@ -217,7 +216,6 @@ void main() { hasEnabledState: true, isEnabled: true, hasTapAction: true, - hasLongPressAction: true, isFocusable: true, )); handle.dispose(); diff --git a/packages/flutter/test/material/calendar_date_picker_test.dart b/packages/flutter/test/material/calendar_date_picker_test.dart index fe6d1eb99b9c..ac7788206ec4 100644 --- a/packages/flutter/test/material/calendar_date_picker_test.dart +++ b/packages/flutter/test/material/calendar_date_picker_test.dart @@ -672,7 +672,6 @@ void main() { tooltip: 'Previous month', isButton: true, hasTapAction: true, - hasLongPressAction: true, isEnabled: true, hasEnabledState: true, isFocusable: true, @@ -681,7 +680,6 @@ void main() { tooltip: 'Next month', isButton: true, hasTapAction: true, - hasLongPressAction: true, isEnabled: true, hasEnabledState: true, isFocusable: true, diff --git a/packages/flutter/test/material/chip_test.dart b/packages/flutter/test/material/chip_test.dart index 164e0e4137a2..13e27b6f2c3f 100644 --- a/packages/flutter/test/material/chip_test.dart +++ b/packages/flutter/test/material/chip_test.dart @@ -2047,10 +2047,7 @@ void main() { children: [ TestSemantics( tooltip: 'Delete', - actions: [ - SemanticsAction.tap, - SemanticsAction.longPress - ], + actions: [SemanticsAction.tap], textDirection: TextDirection.ltr, flags: [ SemanticsFlag.isButton, diff --git a/packages/flutter/test/material/date_picker_test.dart b/packages/flutter/test/material/date_picker_test.dart index b6b6bcef5386..648080cfad3a 100644 --- a/packages/flutter/test/material/date_picker_test.dart +++ b/packages/flutter/test/material/date_picker_test.dart @@ -833,7 +833,6 @@ void main() { tooltip: 'Switch to input', isButton: true, hasTapAction: true, - hasLongPressAction: true, isEnabled: true, hasEnabledState: true, isFocusable: true, @@ -877,7 +876,6 @@ void main() { tooltip: 'Switch to calendar', isButton: true, hasTapAction: true, - hasLongPressAction: true, isEnabled: true, hasEnabledState: true, isFocusable: true, diff --git a/packages/flutter/test/material/floating_action_button_test.dart b/packages/flutter/test/material/floating_action_button_test.dart index 15b4f27c63fb..3a1827045a04 100644 --- a/packages/flutter/test/material/floating_action_button_test.dart +++ b/packages/flutter/test/material/floating_action_button_test.dart @@ -700,7 +700,6 @@ void main() { tooltip: 'Add Photo', actions: [ SemanticsAction.tap, - SemanticsAction.longPress, ], flags: [ SemanticsFlag.hasEnabledState, diff --git a/packages/flutter/test/material/search_test.dart b/packages/flutter/test/material/search_test.dart index a3d1c60eeccc..19f03af5d541 100644 --- a/packages/flutter/test/material/search_test.dart +++ b/packages/flutter/test/material/search_test.dart @@ -620,10 +620,7 @@ void main() { SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, ], - actions: [ - SemanticsAction.tap, - SemanticsAction.longPress, - ], + actions: [SemanticsAction.tap], tooltip: 'Back', textDirection: TextDirection.ltr, ), diff --git a/packages/flutter/test/material/tooltip_test.dart b/packages/flutter/test/material/tooltip_test.dart index a40442161dd1..0cef50d5f531 100644 --- a/packages/flutter/test/material/tooltip_test.dart +++ b/packages/flutter/test/material/tooltip_test.dart @@ -1416,9 +1416,6 @@ void main() { id: 1, tooltip: 'TIP', textDirection: TextDirection.ltr, - actions: [ - SemanticsAction.longPress, - ], ), ], ); @@ -1619,9 +1616,6 @@ void main() { tooltip: 'Foo', label: 'Bar', textDirection: TextDirection.ltr, - actions: [ - SemanticsAction.longPress, - ], ), ], ), diff --git a/packages/flutter/test/material/tooltip_theme_test.dart b/packages/flutter/test/material/tooltip_theme_test.dart index d26a8d31a2d8..4595bda8d56b 100644 --- a/packages/flutter/test/material/tooltip_theme_test.dart +++ b/packages/flutter/test/material/tooltip_theme_test.dart @@ -1075,9 +1075,6 @@ void main() { tooltip: 'Foo', label: 'Bar', textDirection: TextDirection.ltr, - actions: [ - SemanticsAction.longPress, - ], ), ], ), @@ -1121,9 +1118,6 @@ void main() { tooltip: 'Foo', label: 'Bar', textDirection: TextDirection.ltr, - actions: [ - SemanticsAction.longPress, - ], ), ], ),