Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5f2b566

Browse files
authored
Sync accessibility flags in embedder.h (#32332)
The following enum types in `embedder.h` must match with the corresponding Dart/C++ classes in `dart:ui` but some values are missing. - `FlutterAccessibilityFeature` - `FlutterSemanticsAction` - `FlutterSemanticsFlag` The comments say https://github.com/flutter/engine/blob/2d29e2f3b5e4c951809eb7578ff5f114f91efbeb/shell/platform/embedder/embedder.h#L83 https://github.com/flutter/engine/blob/2d29e2f3b5e4c951809eb7578ff5f114f91efbeb/lib/ui/window.dart#L784-L785 Issue: flutter/flutter#101217
1 parent dc87c74 commit 5f2b566

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

shell/platform/embedder/embedder.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ typedef enum {
9292
/// Request that text be rendered at a bold font weight.
9393
kFlutterAccessibilityFeatureBoldText = 1 << 3,
9494
/// Request that certain animations be simplified and parallax effects
95-
// removed.
95+
/// removed.
9696
kFlutterAccessibilityFeatureReduceMotion = 1 << 4,
97+
/// Request that UI be rendered with darker colors.
98+
kFlutterAccessibilityFeatureHighContrast = 1 << 5,
99+
/// Request to show on/off labels inside switches.
100+
kFlutterAccessibilityFeatureOnOffSwitchLabels = 1 << 6,
97101
} FlutterAccessibilityFeature;
98102

99103
/// The set of possible actions that can be conveyed to a semantics node.
@@ -149,6 +153,8 @@ typedef enum {
149153
kFlutterSemanticsActionMoveCursorForwardByWord = 1 << 19,
150154
/// Move the cursor backward by one word.
151155
kFlutterSemanticsActionMoveCursorBackwardByWord = 1 << 20,
156+
/// Replace the current text in the text field.
157+
kFlutterSemanticsActionSetText = 1 << 21,
152158
} FlutterSemanticsAction;
153159

154160
/// The set of properties that may be associated with a semantics node.
@@ -203,6 +209,12 @@ typedef enum {
203209
/// `PageView` widget does not have implicit scrolling, so that users don't
204210
/// navigate to the next page when reaching the end of the current one.
205211
kFlutterSemanticsFlagHasImplicitScrolling = 1 << 18,
212+
/// Whether the value of the semantics node is coming from a multi-line text
213+
/// field.
214+
///
215+
/// This is used for text fields to distinguish single-line text fields from
216+
/// multi-line ones.
217+
kFlutterSemanticsFlagIsMultiline = 1 << 19,
206218
/// Whether the semantic node is read only.
207219
///
208220
/// Only applicable when kFlutterSemanticsFlagIsTextField flag is on.

0 commit comments

Comments
 (0)