b/227994145
Steps to Reproduce
- Execute
flutter run to run the Gallery app (https://github.com/flutter/gallery) on an Android phone
- Navigate to 'MATERIAL'
- Navigate to 'Text Field'
- Turn on Voice Access and use Voice Access to input to one of the Text Fields
Expected results:
Input text matches what the user said.
Actual results:
Semantics label + InputDecoration.prefixText + InputDecoration.labelText + InputDecoration.hintText gets added to user input.
Code sample
https://github.com/flutter/gallery/blob/main/lib/demos/material/text_field_demo.dart
Logs
Issue can be temporarily fixed by setting the onSetText property to an empty function in the Semantics widget here:
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/text_field.dart#L1453
Suspected root cause (@chunhtai): https://github.com/flutter/engine/blob/453a60f06a594834f15281cb4f29632075bb59cc/shell/platform/android/io/flutter/view/AccessibilityBridge.java#L888
Note:
'ABC' is the actual voice input, 'Name*' is InputDecoration.labelText, 'What do people call you?' is InputDecoration.hintText;
If we set InputDecoration.prefixText / add label to the Semantics widget mentioned above in TextField.dart, they will also be added to the input.

b/227994145
Steps to Reproduce
flutter runto run the Gallery app (https://github.com/flutter/gallery) on an Android phoneExpected results:
Input text matches what the user said.
Actual results:
Semantics label + InputDecoration.prefixText + InputDecoration.labelText + InputDecoration.hintText gets added to user input.
Code sample
Logs
Suspected root cause (@chunhtai): https://github.com/flutter/engine/blob/453a60f06a594834f15281cb4f29632075bb59cc/shell/platform/android/io/flutter/view/AccessibilityBridge.java#L888
Note:
'ABC' is the actual voice input, 'Name*' is InputDecoration.labelText, 'What do people call you?' is InputDecoration.hintText;
If we set InputDecoration.prefixText / add label to the Semantics widget mentioned above in TextField.dart, they will also be added to the input.