From c176740d37d88225f1e89436dbb8318287d09266 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Wed, 30 Mar 2022 10:46:29 +0900 Subject: [PATCH 1/4] Sync accessibility features of window.dart and embedder.h --- shell/platform/embedder/embedder.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index 4cefaab892b96..64e70ff9d7bf5 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -92,8 +92,10 @@ typedef enum { /// Request that text be rendered at a bold font weight. kFlutterAccessibilityFeatureBoldText = 1 << 3, /// Request that certain animations be simplified and parallax effects - // removed. + /// removed. kFlutterAccessibilityFeatureReduceMotion = 1 << 4, + /// Request that UI be rendered with darker colors. + kFlutterAccessibilityFeatureHighContrast = 1 << 5, } FlutterAccessibilityFeature; /// The set of possible actions that can be conveyed to a semantics node. From f43988bc365c4849695e43449d7c944bf8e0d862 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Fri, 1 Apr 2022 11:48:05 +0900 Subject: [PATCH 2/4] Add missing OnOffSwitchLabels flag --- shell/platform/embedder/embedder.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index 64e70ff9d7bf5..1bfa3510e5e7a 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -96,6 +96,8 @@ typedef enum { kFlutterAccessibilityFeatureReduceMotion = 1 << 4, /// Request that UI be rendered with darker colors. kFlutterAccessibilityFeatureHighContrast = 1 << 5, + /// Request to show on/off labels inside switches. + kFlutterAccessibilityFeatureOnOffSwitchLabels = 1 << 6, } FlutterAccessibilityFeature; /// The set of possible actions that can be conveyed to a semantics node. From b536a46827d29f61525189f19a21af7f47e2c5c2 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Fri, 1 Apr 2022 15:59:59 +0900 Subject: [PATCH 3/4] Update FlutterSemanticsAction --- shell/platform/embedder/embedder.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index 1bfa3510e5e7a..6e2318e8fab3a 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -153,6 +153,8 @@ typedef enum { kFlutterSemanticsActionMoveCursorForwardByWord = 1 << 19, /// Move the cursor backward by one word. kFlutterSemanticsActionMoveCursorBackwardByWord = 1 << 20, + /// Replace the current text in the text field. + kFlutterSemanticsActionSetText = 1 << 21, } FlutterSemanticsAction; /// The set of properties that may be associated with a semantics node. From 66af23f6c7964c128949d40302179a0e99606ad2 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Mon, 4 Apr 2022 10:52:08 +0900 Subject: [PATCH 4/4] Add kFlutterSemanticsFlagIsMultiline --- shell/platform/embedder/embedder.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index 6e2318e8fab3a..66a25c7f30c5b 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -209,6 +209,12 @@ typedef enum { /// `PageView` widget does not have implicit scrolling, so that users don't /// navigate to the next page when reaching the end of the current one. kFlutterSemanticsFlagHasImplicitScrolling = 1 << 18, + /// Whether the value of the semantics node is coming from a multi-line text + /// field. + /// + /// This is used for text fields to distinguish single-line text fields from + /// multi-line ones. + kFlutterSemanticsFlagIsMultiline = 1 << 19, /// Whether the semantic node is read only. /// /// Only applicable when kFlutterSemanticsFlagIsTextField flag is on.