We should move all possible Semantics logic out of the design languages and into EditableText, to be DRY and to make sure that direct users of EditableText can easily get nitty gritty semantics details right.
Background
Currently, EditableText only includes a Semantics widget for toolbar operations:
|
child: Semantics( |
|
inputType: inputType, |
|
onCopy: _semanticsOnCopy(controls), |
|
onCut: _semanticsOnCut(controls), |
|
onPaste: _semanticsOnPaste(controls), |
|
child: _ScribbleFocusable( |
Meanwhile in TextField and in CupertinoTextField, there is Semantics logic for gestures and focus that is relevant to all users of text input.
Recommendation
We should move all possible common semantics logic out of TextField/CupertinoTextField and into EditableText.
As a part of that PR, we should also move the test mentioned in https://github.com/flutter/flutter/pull/181722/files#r2760694144 back to the Widgets library, since it tests this semantics logic.
Resources
This came up in: https://github.com/flutter/flutter/pull/181722/files#r2760694144
We should move all possible Semantics logic out of the design languages and into EditableText, to be DRY and to make sure that direct users of EditableText can easily get nitty gritty semantics details right.
Background
Currently, EditableText only includes a Semantics widget for toolbar operations:
flutter/packages/flutter/lib/src/widgets/editable_text.dart
Lines 5800 to 5805 in 018a571
Meanwhile in TextField and in CupertinoTextField, there is Semantics logic for gestures and focus that is relevant to all users of text input.
Recommendation
We should move all possible common semantics logic out of TextField/CupertinoTextField and into EditableText.
As a part of that PR, we should also move the test mentioned in https://github.com/flutter/flutter/pull/181722/files#r2760694144 back to the Widgets library, since it tests this semantics logic.
Resources
This came up in: https://github.com/flutter/flutter/pull/181722/files#r2760694144