Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
7f12d42e
Unverified
Commit
7f12d42e
authored
May 11, 2022
by
LongCatIsLooong
Committed by
GitHub
May 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Accessibility troubleshooting docs for TextField widgets (#103521)
parent
ac333309
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
text_field.dart
packages/flutter/lib/src/cupertino/text_field.dart
+2
-0
text_field.dart
packages/flutter/lib/src/material/text_field.dart
+2
-0
editable_text.dart
packages/flutter/lib/src/widgets/editable_text.dart
+24
-0
No files found.
packages/flutter/lib/src/cupertino/text_field.dart
View file @
7f12d42e
...
...
@@ -200,6 +200,8 @@ class CupertinoTextField extends StatefulWidget {
/// [enableSuggestions], and [enableIMEPersonalizedLearning] properties must
/// not be null.
///
/// {@macro flutter.widgets.editableText.accessibility}
///
/// See also:
///
/// * [minLines], which is the minimum number of lines to occupy when the
...
...
packages/flutter/lib/src/material/text_field.dart
View file @
7f12d42e
...
...
@@ -207,6 +207,8 @@ class _TextFieldSelectionGestureDetectorBuilder extends TextSelectionGestureDete
///
/// {@macro flutter.widgets.editableText.showCaretOnScreen}
///
/// {@macro flutter.widgets.editableText.accessibility}
///
/// See also:
///
/// * [TextFormField], which integrates with the [Form] widget.
...
...
packages/flutter/lib/src/widgets/editable_text.dart
View file @
7f12d42e
...
...
@@ -437,6 +437,30 @@ class ToolbarOptions {
/// * When the virtual keyboard pops up.
/// {@endtemplate}
///
/// {@template flutter.widgets.editableText.accessibility}
/// ## Troubleshooting Common Accessibility Issues
///
/// ### Customizing User Input Accessibility Announcements
///
/// To customize user input accessibility announcements triggered by text
/// changes, use [SemanticsService.announce] to make the desired
/// accessibility announcement.
///
/// On iOS, the on-screen keyboard may announce the most recent input
/// incorrectly when a [TextInputFormatter] inserts a thousands separator to
/// a currency value text field. The following example demonstrates how to
/// suppress the default accessibility announcements by always announcing
/// the content of the text field as a US currency value:
/// ```dart
/// onChanged: (String newText) {
/// if (newText.isNotEmpty) {
/// SemanticsService.announce('\$' + newText, Directionality.of(context));
/// }
/// }
/// ```
///
/// {@endtemplate}
///
/// See also:
///
/// * [TextField], which is a full-featured, material-design text input field
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment