Reverts "[a11y] Add isEnabled semantics flag to text field (#143334)" (#143494)

Reverts flutter/flutter#143334

Initiated by: hangyujin

Reason for reverting: broke g3 tests

Original PR Author: hangyujin

Reviewed By: {LongCatIsLooong}

This change reverts the following previous change:
Original Description:
Add a semantics flag to   text field to fix https://github.com/flutter/flutter/issues/143337 (in IOS the disabled text field is not read `dimmed`)

internal: b/322345393
This commit is contained in:
auto-submit[bot]
2024-02-14 22:43:18 +00:00
committed by GitHub
parent eae0c6a357
commit 0fac13b443
7 changed files with 16 additions and 94 deletions

View File

@@ -883,7 +883,6 @@ void main() {
group('simulatedTraversal', () {
final List<Matcher> fullTraversalMatchers = <Matcher>[
containsSemantics(isHeader: true, label: 'Semantics Test'),
containsSemantics(label: 'Text Field'),
containsSemantics(isTextField: true),
containsSemantics(label: 'Off Switch'),
containsSemantics(hasToggledState: true),
@@ -914,7 +913,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to start where the slider is.
final List<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers]..removeRange(0, 9);
final List<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers]..removeRange(0, 8);
expect(
tester.semantics.simulatedAccessibilityTraversal(start: find.byType(Slider)),
@@ -977,7 +976,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to end where the slider is, inclusive.
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(0, 10);
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(0, 9);
expect(
tester.semantics.simulatedAccessibilityTraversal(end: find.byType(Slider)),
@@ -1038,7 +1037,7 @@ void main() {
await tester.pumpWidget(const MaterialApp(home: _SemanticsTestWidget()));
// We're expecting the traversal to start at the text field and end at the slider.
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(1, 10);
final Iterable<Matcher> expectedMatchers = <Matcher>[...fullTraversalMatchers].getRange(1, 9);
expect(
tester.semantics.simulatedAccessibilityTraversal(
@@ -1766,7 +1765,7 @@ class _SemanticsTestWidget extends StatelessWidget {
child: Column(
children: <Widget>[
const _SemanticsTestCard(
label: 'Text Field',
label: 'TextField',
widget: TextField(),
),
_SemanticsTestCard(