mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Reverts: flutter/flutter#142942 Initiated by: zanderso Reason for reverting: Seems to have affected iOS platform view focus: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20native_platform_view_ui_tests_ios/10626/overview Original PR Author: gspencergoog Reviewed By: {yjbanov, goderbauer, chunhtai} This change reverts the following previous change: ## Description This causes the `Focus` widget to request focus on its focus node if the accessibility system (screen reader) focuses a widget via the `SemanticsAction.focus` action. ## Related Issues - https://github.com/flutter/flutter/issues/83809 ## Tests - Added a test to make sure that focus is requested when `SemanticsAction.focus` is sent by the engine.
This commit is contained in:
parent
63daac2a51
commit
ec9965bd89
@ -20,7 +20,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
label: 'Update border shape',
|
||||
));
|
||||
|
||||
@ -30,7 +29,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
label: 'Reset chips',
|
||||
));
|
||||
|
||||
|
@ -671,14 +671,6 @@ class _FocusState extends State<Focus> {
|
||||
Widget child = widget.child;
|
||||
if (widget.includeSemantics) {
|
||||
child = Semantics(
|
||||
// Automatically request the focus for a focusable widget when it
|
||||
// receives an input focus action from the semantics. Nothing is needed
|
||||
// for losing the focus because if focus is lost, that means another
|
||||
// node will gain focus and take focus from this widget.
|
||||
onFocus:
|
||||
_couldRequestFocus
|
||||
? focusNode.requestFocus
|
||||
: null,
|
||||
focusable: _couldRequestFocus,
|
||||
focused: _hadPrimaryFocus,
|
||||
child: widget.child,
|
||||
|
@ -34,7 +34,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
|
||||
@ -55,7 +54,6 @@ void main() {
|
||||
isChecked: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
|
||||
@ -75,7 +73,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
// isFocusable is delayed by 1 frame.
|
||||
isFocusable: true,
|
||||
hasFocusAction: true,
|
||||
));
|
||||
|
||||
await tester.pump();
|
||||
@ -181,7 +178,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
@ -251,7 +247,7 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isCheckStateMixed,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
), hasLength(1));
|
||||
|
||||
await tester.pumpWidget(
|
||||
@ -272,7 +268,7 @@ void main() {
|
||||
SemanticsFlag.isChecked,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
), hasLength(1));
|
||||
|
||||
await tester.pumpWidget(
|
||||
@ -292,7 +288,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
), hasLength(1));
|
||||
|
||||
semantics.dispose();
|
||||
|
@ -147,7 +147,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -172,7 +171,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
isInMutuallyExclusiveGroup: true,
|
||||
));
|
||||
@ -192,7 +190,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
isInMutuallyExclusiveGroup: true,
|
||||
isChecked: true,
|
||||
@ -213,7 +210,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
isInMutuallyExclusiveGroup: true,
|
||||
hasFocusAction: true,
|
||||
));
|
||||
|
||||
await tester.pump();
|
||||
|
@ -1945,7 +1945,7 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(semantics, isNot(includesNodeWith(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Dismiss',
|
||||
)));
|
||||
debugDefaultTargetPlatformOverride = null;
|
||||
|
@ -2621,7 +2621,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus])));
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap])));
|
||||
|
||||
semantics.dispose();
|
||||
});
|
||||
|
@ -215,7 +215,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
@ -259,7 +258,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
|
@ -2111,7 +2111,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -2121,7 +2120,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -2131,7 +2129,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
@ -2168,7 +2165,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -2178,7 +2174,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -2188,7 +2183,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
@ -2521,7 +2515,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -2531,7 +2524,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
@ -2566,7 +2558,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -2576,7 +2567,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
@ -2757,13 +2747,13 @@ void main() {
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'A\nTab 1 of 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'B\nTab 2 of 2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
|
@ -864,7 +864,6 @@ void main() {
|
||||
tooltip: 'Previous month',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
@ -873,7 +872,6 @@ void main() {
|
||||
tooltip: 'Next month',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
@ -884,105 +882,90 @@ void main() {
|
||||
label: '1, Friday, January 1, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('2')), matchesSemantics(
|
||||
label: '2, Saturday, January 2, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('3')), matchesSemantics(
|
||||
label: '3, Sunday, January 3, 2016, Today',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('4')), matchesSemantics(
|
||||
label: '4, Monday, January 4, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('5')), matchesSemantics(
|
||||
label: '5, Tuesday, January 5, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('6')), matchesSemantics(
|
||||
label: '6, Wednesday, January 6, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('7')), matchesSemantics(
|
||||
label: '7, Thursday, January 7, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('8')), matchesSemantics(
|
||||
label: '8, Friday, January 8, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('9')), matchesSemantics(
|
||||
label: '9, Saturday, January 9, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('10')), matchesSemantics(
|
||||
label: '10, Sunday, January 10, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('11')), matchesSemantics(
|
||||
label: '11, Monday, January 11, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('12')), matchesSemantics(
|
||||
label: '12, Tuesday, January 12, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('13')), matchesSemantics(
|
||||
label: '13, Wednesday, January 13, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('14')), matchesSemantics(
|
||||
label: '14, Thursday, January 14, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('15')), matchesSemantics(
|
||||
label: '15, Friday, January 15, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isSelected: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
@ -990,105 +973,90 @@ void main() {
|
||||
label: '16, Saturday, January 16, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('17')), matchesSemantics(
|
||||
label: '17, Sunday, January 17, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('18')), matchesSemantics(
|
||||
label: '18, Monday, January 18, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('19')), matchesSemantics(
|
||||
label: '19, Tuesday, January 19, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('20')), matchesSemantics(
|
||||
label: '20, Wednesday, January 20, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('21')), matchesSemantics(
|
||||
label: '21, Thursday, January 21, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('22')), matchesSemantics(
|
||||
label: '22, Friday, January 22, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('23')), matchesSemantics(
|
||||
label: '23, Saturday, January 23, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('24')), matchesSemantics(
|
||||
label: '24, Sunday, January 24, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('25')), matchesSemantics(
|
||||
label: '25, Monday, January 25, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('26')), matchesSemantics(
|
||||
label: '26, Tuesday, January 26, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('27')), matchesSemantics(
|
||||
label: '27, Wednesday, January 27, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('28')), matchesSemantics(
|
||||
label: '28, Thursday, January 28, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('29')), matchesSemantics(
|
||||
label: '29, Friday, January 29, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
expect(tester.getSemantics(find.text('30')), matchesSemantics(
|
||||
label: '30, Saturday, January 30, 2016',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
semantics.dispose();
|
||||
@ -1113,7 +1081,6 @@ void main() {
|
||||
expect(tester.getSemantics(find.text('$year')), matchesSemantics(
|
||||
label: '$year',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isSelected: year == 2016,
|
||||
isFocusable: true,
|
||||
isButton: true,
|
||||
|
@ -130,7 +130,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
|
@ -1189,7 +1189,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
label: 'Hello\nthere',
|
||||
));
|
||||
|
@ -78,7 +78,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
|
||||
@ -98,7 +97,6 @@ void main() {
|
||||
isChecked: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
|
||||
@ -117,7 +115,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
// isFocusable is delayed by 1 frame.
|
||||
isFocusable: true,
|
||||
hasFocusAction: true,
|
||||
));
|
||||
|
||||
await tester.pump();
|
||||
@ -216,7 +213,6 @@ void main() {
|
||||
isChecked: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
@ -246,7 +242,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
@ -322,7 +317,7 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isCheckStateMixed,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
), hasLength(1));
|
||||
|
||||
await tester.pumpWidget(
|
||||
@ -346,7 +341,7 @@ void main() {
|
||||
SemanticsFlag.isChecked,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
), hasLength(1));
|
||||
|
||||
await tester.pumpWidget(
|
||||
@ -369,7 +364,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
), hasLength(1));
|
||||
|
||||
semantics.dispose();
|
||||
|
@ -2971,7 +2971,7 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
tooltip: 'Delete',
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
@ -3030,7 +3030,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3088,7 +3088,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3141,7 +3141,7 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSelected,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3295,7 +3295,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -1545,7 +1545,6 @@ void main() {
|
||||
label: '3, Sunday, January 3, 2016, Today',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
|
||||
@ -1554,7 +1553,6 @@ void main() {
|
||||
tooltip: 'Switch to input',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
@ -1567,7 +1565,6 @@ void main() {
|
||||
label: 'OK',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
@ -1576,7 +1573,6 @@ void main() {
|
||||
label: 'CANCEL',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
@ -1607,7 +1603,6 @@ void main() {
|
||||
tooltip: 'Switch to calendar',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
@ -1635,7 +1630,6 @@ void main() {
|
||||
label: 'OK',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
@ -1644,7 +1638,6 @@ void main() {
|
||||
label: 'CANCEL',
|
||||
isButton: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isEnabled: true,
|
||||
hasEnabledState: true,
|
||||
isFocusable: true,
|
||||
|
@ -1319,7 +1319,6 @@ void main() {
|
||||
matchesSemantics(
|
||||
label: '30, Saturday, January 30, 2016, Today',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
),
|
||||
);
|
||||
|
@ -182,7 +182,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
@ -240,7 +239,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
|
@ -147,7 +147,7 @@ void main() {
|
||||
|
||||
expect(semantics, isNot(includesNodeWith(
|
||||
label: const DefaultMaterialLocalizations().modalBarrierDismissLabel,
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
)));
|
||||
|
||||
semantics.dispose();
|
||||
|
@ -1300,7 +1300,6 @@ void main() {
|
||||
isButton: true,
|
||||
label: 'test',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
|
||||
@ -1316,7 +1315,6 @@ void main() {
|
||||
isButton: true,
|
||||
label: 'three',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isFocusable: true,
|
||||
));
|
||||
handle.dispose();
|
||||
@ -1362,28 +1360,28 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'two',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'three',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'four',
|
||||
textDirection: TextDirection.ltr,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
tags: <SemanticsTag>[const SemanticsTag('RenderViewport.twoPane')],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -819,7 +819,6 @@ void main() {
|
||||
TestSemantics.rootChild(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
|
@ -217,7 +217,6 @@ void main() {
|
||||
|
||||
expect(tester.getSemantics(find.byType(ExpandIcon)), matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
@ -234,7 +233,6 @@ void main() {
|
||||
|
||||
expect(tester.getSemantics(find.byType(ExpandIcon)), matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
@ -260,7 +258,6 @@ void main() {
|
||||
children: <Matcher>[
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
@ -280,7 +277,6 @@ void main() {
|
||||
children: <Matcher>[
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
|
@ -211,7 +211,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
));
|
||||
|
||||
// Check custom header widget semantics is preserved.
|
||||
@ -262,7 +261,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
],
|
||||
));
|
||||
@ -1101,7 +1099,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
onTapHint: localizations.expandedIconTapHint,
|
||||
));
|
||||
|
||||
@ -1126,7 +1123,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
onTapHint: localizations.collapsedIconTapHint,
|
||||
));
|
||||
|
||||
@ -1191,7 +1187,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
],
|
||||
));
|
||||
@ -1220,7 +1215,6 @@ void main() {
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
],
|
||||
));
|
||||
@ -1274,7 +1268,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
hasEnabledState: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
));
|
||||
|
||||
expect(tester.getSemantics(find.byKey(collapsedKey)), matchesSemantics(
|
||||
@ -1283,7 +1276,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
hasEnabledState: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
));
|
||||
|
||||
handle.dispose();
|
||||
|
@ -728,7 +728,6 @@ void main() {
|
||||
tester.getSemantics(find.byType(ListTile).first),
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
isFocused: true,
|
||||
@ -743,7 +742,6 @@ void main() {
|
||||
tester.getSemantics(find.byType(ListTile).last),
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
isFocusable: true,
|
||||
|
@ -1004,7 +1004,6 @@ void main() {
|
||||
TestSemantics.rootChild(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
|
@ -631,7 +631,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -700,7 +699,6 @@ void main() {
|
||||
tooltip: 'Add Photo',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
@ -924,7 +922,6 @@ void main() {
|
||||
tester.getSemantics(find.byType(FloatingActionButton)),
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasEnabledState: true,
|
||||
isButton: true,
|
||||
isEnabled: true,
|
||||
|
@ -616,7 +616,6 @@ void main() {
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 48.0, 48.0),
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
@ -691,7 +690,6 @@ void main() {
|
||||
TestSemantics(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
@ -2179,7 +2177,6 @@ void main() {
|
||||
TestSemantics.rootChild(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
transform: Matrix4.translationValues(356.0, 276.0, 0.0),
|
||||
|
@ -1178,7 +1178,7 @@ testWidgets('InkResponse radius can be updated', (WidgetTester tester) async {
|
||||
),
|
||||
),
|
||||
));
|
||||
expect(semantics, includesNodeWith(label: 'Button', actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus]));
|
||||
expect(semantics, includesNodeWith(label: 'Button', actions: <SemanticsAction>[SemanticsAction.tap]));
|
||||
|
||||
await tester.pumpWidget(Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
@ -1190,7 +1190,7 @@ testWidgets('InkResponse radius can be updated', (WidgetTester tester) async {
|
||||
),
|
||||
),
|
||||
));
|
||||
expect(semantics, isNot(includesNodeWith(label: 'Button', actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus])));
|
||||
expect(semantics, isNot(includesNodeWith(label: 'Button', actions: <SemanticsAction>[SemanticsAction.tap])));
|
||||
|
||||
semantics.dispose();
|
||||
});
|
||||
@ -1983,7 +1983,6 @@ testWidgets('InkResponse radius can be updated', (WidgetTester tester) async {
|
||||
label: 'Foo',
|
||||
hasLongPressAction: true,
|
||||
isFocusable: true,
|
||||
hasFocusAction: true,
|
||||
textDirection: TextDirection.ltr,
|
||||
));
|
||||
|
||||
@ -2004,7 +2003,6 @@ testWidgets('InkResponse radius can be updated', (WidgetTester tester) async {
|
||||
expect(tester.getSemantics(find.bySemanticsLabel('Foo')), matchesSemantics(
|
||||
label: 'Foo',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
hasLongPressAction: true,
|
||||
isFocusable: true,
|
||||
textDirection: TextDirection.ltr,
|
||||
|
@ -308,7 +308,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'two',
|
||||
),
|
||||
TestSemantics.rootChild(
|
||||
|
@ -620,7 +620,6 @@ void main() {
|
||||
label: 'Button',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.hasEnabledState,
|
||||
@ -662,7 +661,6 @@ void main() {
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -3421,7 +3421,6 @@ void main() {
|
||||
TestSemantics.rootChild(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
@ -3552,7 +3551,7 @@ void main() {
|
||||
SemanticsFlag.hasExpandedState,
|
||||
SemanticsFlag.isExpanded,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
),
|
||||
@ -3574,7 +3573,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -3622,7 +3621,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
),
|
||||
|
@ -559,7 +559,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -569,7 +568,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
|
||||
@ -582,7 +580,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -593,7 +590,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
@ -628,7 +624,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -638,7 +633,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
|
||||
@ -651,7 +645,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -662,7 +655,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
@ -324,7 +324,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -334,7 +333,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
|
||||
@ -347,7 +345,6 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
isFocusable: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
@ -358,7 +355,6 @@ void main() {
|
||||
isFocusable: true,
|
||||
isSelected: true,
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
@ -5513,25 +5513,25 @@ TestSemantics _expectedSemantics() {
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Abc\nTab 1 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Def\nTab 2 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Ghi\nTab 3 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
TestSemantics(
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Jkl\nTab 4 of 4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
|
@ -1073,7 +1073,6 @@ void main() {
|
||||
TestSemantics.rootChild(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
|
@ -1219,7 +1219,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1230,7 +1230,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1241,7 +1241,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1252,7 +1252,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1263,7 +1263,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1351,7 +1351,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'test1\ntest2',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1432,7 +1432,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '1',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1452,7 +1452,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '3',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1463,7 +1463,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '4',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -1474,7 +1474,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: '5',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
|
@ -411,7 +411,7 @@ void main() {
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -448,7 +448,7 @@ void main() {
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -483,7 +483,6 @@ void main() {
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus],
|
||||
label: 'Title',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
|
@ -221,7 +221,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -255,7 +254,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -286,7 +284,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -313,7 +310,6 @@ void main() {
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
SemanticsFlag.isFocusable, // This flag is delayed by 1 frame.
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus],
|
||||
),
|
||||
],
|
||||
), ignoreRect: true, ignoreTransform: true));
|
||||
|
@ -160,7 +160,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
label: '+',
|
||||
textDirection: TextDirection.ltr,
|
||||
|
@ -751,7 +751,6 @@ void main() {
|
||||
hasEnabledState: true,
|
||||
label: 'Switch tile',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
));
|
||||
handle.dispose();
|
||||
});
|
||||
|
@ -662,7 +662,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
tooltip: 'Back',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -718,7 +718,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Suggestions',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -812,7 +812,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
tooltip: 'Back',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
@ -856,7 +856,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Suggestions',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
|
@ -449,7 +449,6 @@ void main() {
|
||||
label: '1',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
|
||||
@ -467,7 +466,6 @@ void main() {
|
||||
label: '2',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
|
||||
@ -531,7 +529,6 @@ void main() {
|
||||
label: '1',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
|
||||
@ -547,7 +544,6 @@ void main() {
|
||||
label: '2',
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
|
||||
|
@ -1292,7 +1292,6 @@ void main() {
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.focus,
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
],
|
||||
@ -1351,7 +1350,6 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus],
|
||||
value: '50%',
|
||||
increasedValue: '55%',
|
||||
decreasedValue: '45%',
|
||||
@ -1454,7 +1452,7 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus, SemanticsAction.increase, SemanticsAction.decrease],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '50%',
|
||||
increasedValue: '60%',
|
||||
decreasedValue: '40%',
|
||||
@ -1567,7 +1565,6 @@ void main() {
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.focus,
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
@ -1628,7 +1625,6 @@ void main() {
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.focus,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
],
|
||||
value: '50%',
|
||||
@ -1733,7 +1729,7 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus, SemanticsAction.increase, SemanticsAction.decrease],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '40',
|
||||
increasedValue: '60',
|
||||
decreasedValue: '20',
|
||||
@ -1793,7 +1789,7 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.hasEnabledState, SemanticsFlag.isEnabled, SemanticsFlag.isFocusable, SemanticsFlag.isSlider],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus, SemanticsAction.increase, SemanticsAction.decrease],
|
||||
actions: <SemanticsAction>[SemanticsAction.increase, SemanticsAction.decrease],
|
||||
value: '40',
|
||||
increasedValue: '60',
|
||||
decreasedValue: '20',
|
||||
@ -2637,7 +2633,6 @@ void main() {
|
||||
SemanticsFlag.isSlider,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.focus,
|
||||
SemanticsAction.increase,
|
||||
SemanticsAction.decrease,
|
||||
SemanticsAction.didGainAccessibilityFocus,
|
||||
|
@ -78,7 +78,7 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isToggled,
|
||||
],
|
||||
actions: SemanticsAction.tap.index | SemanticsAction.focus.index,
|
||||
actions: SemanticsAction.tap.index,
|
||||
label: 'aaa\nAAA',
|
||||
),
|
||||
TestSemantics.rootChild(
|
||||
@ -92,7 +92,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: SemanticsAction.tap.index | SemanticsAction.focus.index,
|
||||
actions: SemanticsAction.tap.index,
|
||||
label: 'bbb\nBBB',
|
||||
),
|
||||
TestSemantics.rootChild(
|
||||
@ -106,7 +106,7 @@ void main() {
|
||||
SemanticsFlag.isFocusable,
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
],
|
||||
actions: SemanticsAction.tap.index | SemanticsAction.focus.index,
|
||||
actions: SemanticsAction.tap.index,
|
||||
label: 'CCC\nccc',
|
||||
),
|
||||
],
|
||||
|
@ -3592,7 +3592,7 @@ void main() {
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
@ -3604,7 +3604,7 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'TAB #1\nTab 2 of 2',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 116.0, kTextTabBarHeight),
|
||||
transform: Matrix4.translationValues(116.0, 276.0, 0.0),
|
||||
@ -3863,7 +3863,7 @@ void main() {
|
||||
SemanticsFlag.isSelected,
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Semantics override 0\nTab 1 of 2',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 116.0, kTextTabBarHeight),
|
||||
transform: Matrix4.translationValues(0.0, 276.0, 0.0),
|
||||
@ -3871,7 +3871,7 @@ void main() {
|
||||
TestSemantics(
|
||||
id: 5,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Semantics override 1\nTab 2 of 2',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 116.0, kTextTabBarHeight),
|
||||
transform: Matrix4.translationValues(116.0, 276.0, 0.0),
|
||||
@ -5652,14 +5652,14 @@ void main() {
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable, SemanticsFlag.isSelected],
|
||||
id: 2,
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: 1 | SemanticsAction.focus.index,
|
||||
actions: 1,
|
||||
),
|
||||
TestSemantics(
|
||||
label: 'TAB2\nTab 2 of 2',
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
id: 3,
|
||||
rect: TestSemantics.fullScreen,
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
),
|
||||
TestSemantics(
|
||||
id: 4,
|
||||
|
@ -607,7 +607,6 @@ void main() {
|
||||
TestSemantics.rootChild(
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
label: 'ABC',
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
|
@ -6964,7 +6964,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus])));
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap])));
|
||||
semantics.dispose();
|
||||
});
|
||||
|
||||
@ -7005,7 +7005,7 @@ void main() {
|
||||
),
|
||||
);
|
||||
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus])));
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap])));
|
||||
|
||||
semantics.dispose();
|
||||
});
|
||||
|
@ -1250,7 +1250,7 @@ void main() {
|
||||
semantics,
|
||||
includesNodeWith(
|
||||
label: amString,
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isChecked,
|
||||
@ -1264,7 +1264,7 @@ void main() {
|
||||
semantics,
|
||||
includesNodeWith(
|
||||
label: pmString,
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
|
@ -2117,7 +2117,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 87.0, 48.0),
|
||||
),
|
||||
@ -2131,7 +2130,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0)
|
||||
),
|
||||
@ -2145,7 +2143,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
rect: const Rect.fromLTRB(0.0, 0.0, 88.0, 48.0),
|
||||
),
|
||||
@ -2191,7 +2188,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
TestSemantics(
|
||||
@ -2205,7 +2201,6 @@ void main() {
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.tap,
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -531,7 +531,6 @@ void main() {
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
label: 'Signed in\nname\nemail',
|
||||
textDirection: TextDirection.ltr,
|
||||
actions: <SemanticsAction>[SemanticsAction.focus],
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
label: r'B',
|
||||
|
@ -48,7 +48,6 @@ void main() {
|
||||
matchesSemantics(
|
||||
label: 'button',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isButton: true,
|
||||
isFocusable: true,
|
||||
hasEnabledState: true,
|
||||
|
@ -1013,11 +1013,9 @@ void main() {
|
||||
// This semantic is from `Focus` widget under `FocusableActionDetector`.
|
||||
matchesSemantics(
|
||||
isFocusable: true,
|
||||
hasFocusAction: true,
|
||||
children: <Matcher>[
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isButton: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
@ -1027,7 +1025,6 @@ void main() {
|
||||
),
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isButton: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
@ -1071,7 +1068,6 @@ void main() {
|
||||
children: <Matcher>[
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isButton: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
@ -1081,7 +1077,6 @@ void main() {
|
||||
),
|
||||
matchesSemantics(
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isButton: true,
|
||||
hasEnabledState: true,
|
||||
isEnabled: true,
|
||||
|
@ -858,7 +858,6 @@ void main() {
|
||||
matchesSemantics(
|
||||
label: 'button',
|
||||
hasTapAction: true,
|
||||
hasFocusAction: true,
|
||||
isButton: true,
|
||||
isFocusable: true,
|
||||
hasEnabledState: true,
|
||||
|
@ -348,7 +348,7 @@ void main() {
|
||||
scaffoldKey.currentState!.openDrawer();
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus])));
|
||||
expect(semantics, isNot(includesNodeWith(actions: <SemanticsAction>[SemanticsAction.tap])));
|
||||
expect(semantics, isNot(includesNodeWith(label: 'Dismiss')));
|
||||
|
||||
semantics.dispose();
|
||||
|
@ -1999,47 +1999,6 @@ void main() {
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('Focus widget gains input focus when it gains accessibility focus', (WidgetTester tester) async {
|
||||
final SemanticsTester semantics = SemanticsTester(tester);
|
||||
final SemanticsOwner semanticsOwner = tester.binding.pipelineOwner.semanticsOwner!;
|
||||
final FocusNode focusNode = FocusNode();
|
||||
addTearDown(focusNode.dispose);
|
||||
await tester.pumpWidget(
|
||||
Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: Focus(
|
||||
focusNode: focusNode,
|
||||
child: const Text('Test'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
semantics,
|
||||
hasSemantics(
|
||||
TestSemantics.root(
|
||||
children: <TestSemantics>[
|
||||
TestSemantics(
|
||||
id: 1,
|
||||
flags: <SemanticsFlag>[SemanticsFlag.isFocusable],
|
||||
actions: <SemanticsAction>[SemanticsAction.focus],
|
||||
label: 'Test',
|
||||
textDirection: TextDirection.rtl,
|
||||
),
|
||||
],
|
||||
),
|
||||
ignoreRect: true,
|
||||
ignoreTransform: true,
|
||||
),
|
||||
);
|
||||
|
||||
expect(focusNode.hasFocus, isFalse);
|
||||
semanticsOwner.performAction(1, SemanticsAction.focus);
|
||||
await tester.pumpAndSettle();
|
||||
expect(focusNode.hasFocus, isTrue);
|
||||
semantics.dispose();
|
||||
});
|
||||
});
|
||||
|
||||
group('ExcludeFocus', () {
|
||||
|
@ -3182,9 +3182,6 @@ void main() {
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isFocusable,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
SemanticsAction.focus,
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -333,7 +333,7 @@ void main() {
|
||||
);
|
||||
|
||||
expect(semantics, isNot(includesNodeWith(
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
)));
|
||||
|
||||
semantics.dispose();
|
||||
|
@ -260,7 +260,7 @@ void main() {
|
||||
SemanticsFlag.isEnabled,
|
||||
SemanticsFlag.isFocusable
|
||||
],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap, SemanticsAction.focus],
|
||||
actions: <SemanticsAction>[SemanticsAction.tap],
|
||||
label: 'Button',
|
||||
textDirection: TextDirection.ltr,
|
||||
),
|
||||
|
@ -674,7 +674,6 @@ Matcher matchesSemantics({
|
||||
bool isExpanded = false,
|
||||
// Actions //
|
||||
bool hasTapAction = false,
|
||||
bool hasFocusAction = false,
|
||||
bool hasLongPressAction = false,
|
||||
bool hasScrollLeftAction = false,
|
||||
bool hasScrollRightAction = false,
|
||||
@ -754,7 +753,6 @@ Matcher matchesSemantics({
|
||||
isExpanded: isExpanded,
|
||||
// Actions
|
||||
hasTapAction: hasTapAction,
|
||||
hasFocusAction: hasFocusAction,
|
||||
hasLongPressAction: hasLongPressAction,
|
||||
hasScrollLeftAction: hasScrollLeftAction,
|
||||
hasScrollRightAction: hasScrollRightAction,
|
||||
@ -862,7 +860,6 @@ Matcher containsSemantics({
|
||||
bool? isExpanded,
|
||||
// Actions
|
||||
bool? hasTapAction,
|
||||
bool? hasFocusAction,
|
||||
bool? hasLongPressAction,
|
||||
bool? hasScrollLeftAction,
|
||||
bool? hasScrollRightAction,
|
||||
@ -942,7 +939,6 @@ Matcher containsSemantics({
|
||||
isExpanded: isExpanded,
|
||||
// Actions
|
||||
hasTapAction: hasTapAction,
|
||||
hasFocusAction: hasFocusAction,
|
||||
hasLongPressAction: hasLongPressAction,
|
||||
hasScrollLeftAction: hasScrollLeftAction,
|
||||
hasScrollRightAction: hasScrollRightAction,
|
||||
@ -2263,7 +2259,6 @@ class _MatchesSemanticsData extends Matcher {
|
||||
required bool? isExpanded,
|
||||
// Actions
|
||||
required bool? hasTapAction,
|
||||
required bool? hasFocusAction,
|
||||
required bool? hasLongPressAction,
|
||||
required bool? hasScrollLeftAction,
|
||||
required bool? hasScrollRightAction,
|
||||
@ -2322,7 +2317,6 @@ class _MatchesSemanticsData extends Matcher {
|
||||
},
|
||||
actions = <SemanticsAction, bool>{
|
||||
if (hasTapAction != null) SemanticsAction.tap: hasTapAction,
|
||||
if (hasFocusAction != null) SemanticsAction.focus: hasFocusAction,
|
||||
if (hasLongPressAction != null) SemanticsAction.longPress: hasLongPressAction,
|
||||
if (hasScrollLeftAction != null) SemanticsAction.scrollLeft: hasScrollLeftAction,
|
||||
if (hasScrollRightAction != null) SemanticsAction.scrollRight: hasScrollRightAction,
|
||||
@ -2385,8 +2379,8 @@ class _MatchesSemanticsData extends Matcher {
|
||||
final Map<SemanticsFlag, bool> flags;
|
||||
|
||||
@override
|
||||
Description describe(Description description, [String? index]) {
|
||||
description.add('${index == null ? '' : 'Child $index '}has semantics');
|
||||
Description describe(Description description) {
|
||||
description.add('has semantics');
|
||||
if (label != null) {
|
||||
description.add(' with label: $label');
|
||||
}
|
||||
@ -2485,15 +2479,9 @@ class _MatchesSemanticsData extends Matcher {
|
||||
description.add(' with custom hints: $hintOverrides');
|
||||
}
|
||||
if (children != null) {
|
||||
description.add(' with children:\n ');
|
||||
final List<_MatchesSemanticsData> childMatches = children!.cast<_MatchesSemanticsData>();
|
||||
int childIndex = 1;
|
||||
for (final _MatchesSemanticsData child in childMatches) {
|
||||
child.describe(description, index != null ? '$index:$childIndex': '$childIndex');
|
||||
if (child != childMatches.last) {
|
||||
description.add('\n ');
|
||||
}
|
||||
childIndex += 1;
|
||||
description.add(' with children:\n');
|
||||
for (final _MatchesSemanticsData child in children!.cast<_MatchesSemanticsData>()) {
|
||||
child.describe(description);
|
||||
}
|
||||
}
|
||||
return description;
|
||||
|
@ -746,7 +746,6 @@ void main() {
|
||||
hasDidGainAccessibilityFocusAction: true,
|
||||
hasDidLoseAccessibilityFocusAction: true,
|
||||
hasDismissAction: true,
|
||||
hasFocusAction: true,
|
||||
customActions: <CustomSemanticsAction>[action],
|
||||
));
|
||||
});
|
||||
@ -1034,7 +1033,6 @@ void main() {
|
||||
hasDidGainAccessibilityFocusAction: true,
|
||||
hasDidLoseAccessibilityFocusAction: true,
|
||||
hasDismissAction: true,
|
||||
hasFocusAction: true,
|
||||
customActions: <CustomSemanticsAction>[action],
|
||||
),
|
||||
);
|
||||
@ -1127,7 +1125,6 @@ void main() {
|
||||
hasDidGainAccessibilityFocusAction: false,
|
||||
hasDidLoseAccessibilityFocusAction: false,
|
||||
hasDismissAction: false,
|
||||
hasFocusAction: false,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user