Unverified Commit 8d5d37d6 authored by Pierre-Louis's avatar Pierre-Louis Committed by GitHub

Exclude semantics is semanticslabel is present (#90136)

parent ff6f7112
......@@ -704,6 +704,7 @@ class _SelectableTextState extends State<SelectableText> with AutomaticKeepAlive
return Semantics(
label: widget.semanticsLabel,
excludeSemantics: widget.semanticsLabel != null,
onLongPress: () {
_effectiveFocusNode.requestFocus();
},
......
......@@ -2251,20 +2251,12 @@ void main() {
expect(semantics, hasSemantics(TestSemantics.root(
children: <TestSemantics>[
TestSemantics.rootChild(
TestSemantics(
id: 1,
textDirection: TextDirection.ltr,
actions: <SemanticsAction>[SemanticsAction.longPress],
label: 'German greeting for good day',
value: 'Guten Tag',
actions: <SemanticsAction>[
SemanticsAction.longPress,
],
flags: <SemanticsFlag>[
SemanticsFlag.isTextField,
SemanticsFlag.isReadOnly,
SemanticsFlag.isMultiline,
],
),
textDirection: TextDirection.ltr,
)
],
), ignoreTransform: true, ignoreRect: true));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment