-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Copy link
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemscustomer: googleVarious Google teamsVarious Google teamsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
When using Talkback for TextField, the prefix text and hint text are read after the input text (text entered by the user) is read. As a result, the user feels that the text is read backward.
Sample flutter app :
demo app talkabck.webm
code sample
import 'package:flutter/cupertino.dart';
import 'package:mobile.flutter.google_material.material2/google_material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: WelcomScreenWidget()
);
}
}
class WelcomScreenWidget extends StatefulWidget {
const WelcomScreenWidget({Key? key}) : super(key: key);
@override
State<WelcomScreenWidget> createState() => _WelcomScreenWidgetState();
}
class _WelcomScreenWidgetState extends State<WelcomScreenWidget> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey,
appBar: AppBar(
title: Text("Welcome"),
),
body: _buildCardNumberInputField(context, TextEditingController()),
);
}
Widget _buildCardNumberInputField(
BuildContext context,
TextEditingController controller,
) {
final textTheme = GoogleTextTheme.of(context);
final cardNumberTextTheme =
textTheme.gmBody1!;
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
textAlign: TextAlign.left,
style: cardNumberTextTheme,
maxLines: 1,
decoration: InputDecoration(
fillColor: Colors.transparent,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Theme.of(context).dividerColor),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Theme.of(context).primaryColor, width: 2),
),
labelText: "label text",
labelStyle: cardNumberTextTheme,
floatingLabelBehavior: FloatingLabelBehavior.never,
hintText: "hint text",
hintStyle: cardNumberTextTheme,
prefixText: "prefix text",
prefixStyle: cardNumberTextTheme,
),
controller: controller,
keyboardType: TextInputType.number,
),
]
);
}
} Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemscustomer: googleVarious Google teamsVarious Google teamsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version