diff --git a/lib/ui/semantics.dart b/lib/ui/semantics.dart index 257944dc258b3122d73e6b6b4c30742954a6a951..6f33669e6f473ae9167c2e8c323ab3cf133c15d6 100644 --- a/lib/ui/semantics.dart +++ b/lib/ui/semantics.dart @@ -291,7 +291,6 @@ class SemanticsFlag { static const int _kIsMultilineIndex = 1 << 19; static const int _kIsReadOnlyIndex = 1 << 20; static const int _kIsFocusableIndex = 1 << 21; - static const int _kIsLinkIndex = 1 << 22; const SemanticsFlag._(this.index); @@ -334,7 +333,7 @@ class SemanticsFlag { /// Whether the semantic node represents a button. /// - /// Platforms have special handling for buttons, for example Android's TalkBack + /// Platforms has special handling for buttons, for example Android's TalkBack /// and iOS's VoiceOver provides an additional hint when the focused object is /// a button. static const SemanticsFlag isButton = SemanticsFlag._(_kIsButtonIndex); @@ -350,13 +349,6 @@ class SemanticsFlag { /// Only applicable when [isTextField] is true. static const SemanticsFlag isReadOnly = SemanticsFlag._(_kIsReadOnlyIndex); - /// Whether the semantic node is an interactive link. - /// - /// Platforms have special handling for links, for example iOS's VoiceOver - /// provides an additional hint when the focused object is a link, as well as - /// the ability to parse the links through another navigation menu. - static const SemanticsFlag isLink = SemanticsFlag._(_kIsLinkIndex); - /// Whether the semantic node is able to hold the user's focus. /// /// The focused element is usually the current receiver of keyboard inputs. @@ -536,7 +528,6 @@ class SemanticsFlag { _kHasImplicitScrollingIndex: hasImplicitScrolling, _kIsMultilineIndex: isMultiline, _kIsReadOnlyIndex: isReadOnly, - _kIsLinkIndex: isLink, }; @override @@ -584,8 +575,6 @@ class SemanticsFlag { return 'SemanticsFlag.isMultiline'; case _kIsReadOnlyIndex: return 'SemanticsFlag.isReadOnly'; - case _kIsLinkIndex: - return 'SemanticsFlag.isLink'; } return null; } diff --git a/lib/ui/semantics/semantics_node.h b/lib/ui/semantics/semantics_node.h index e89ce87cc53b4e19f29d380945a8d03b865f15f2..c135b58b0550155ce2ea94d5238d60178096694a 100644 --- a/lib/ui/semantics/semantics_node.h +++ b/lib/ui/semantics/semantics_node.h @@ -73,7 +73,6 @@ enum class SemanticsFlags : int32_t { // kIsMultiline = 1 << 19, kIsReadOnly = 1 << 20, kIsFocusable = 1 << 21, - kIsLink = 1 << 22, }; const int kScrollableSemanticsFlags = diff --git a/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/shell/platform/android/io/flutter/view/AccessibilityBridge.java index 1679d96869d953526a718d03837d43279f307a17..c542da80f1f8ab3dcb81ec44ba11aebd3071353e 100644 --- a/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -591,7 +591,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { } } - if (semanticsNode.hasFlag(Flag.IS_BUTTON) || semanticsNode.hasFlag(Flag.IS_LINK)) { + if (semanticsNode.hasFlag(Flag.IS_BUTTON)) { result.setClassName("android.widget.Button"); } if (semanticsNode.hasFlag(Flag.IS_IMAGE)) { @@ -1648,8 +1648,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { // The Dart API defines the following flag but it isn't used in Android. // IS_MULTILINE(1 << 19); IS_READ_ONLY(1 << 20), - IS_FOCUSABLE(1 << 21), - IS_LINK(1 << 22); + IS_FOCUSABLE(1 << 21); final int value; diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm index 938cec276ac3724af0e2cf71badb6f864f380dce..ddd5478f8c573dc5cf0983dd55002fc857464add 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm @@ -407,9 +407,6 @@ flutter::SemanticsAction GetSemanticsActionForScrollDirection( if ([self node].HasFlag(flutter::SemanticsFlags::kIsLiveRegion)) { traits |= UIAccessibilityTraitUpdatesFrequently; } - if ([self node].HasFlag(flutter::SemanticsFlags::kIsLink)) { - traits |= UIAccessibilityTraitLink; - } return traits; } diff --git a/shell/platform/embedder/embedder.h b/shell/platform/embedder/embedder.h index d116c0b0c550a000af718a3ff25a65ccfafc8255..7490198b24aecccf9a6c992a815d0e5d4af47048 100644 --- a/shell/platform/embedder/embedder.h +++ b/shell/platform/embedder/embedder.h @@ -63,7 +63,8 @@ typedef enum { /// Must match the `SemanticsAction` enum in semantics.dart. typedef enum { /// The equivalent of a user briefly tapping the screen with the finger - /// without moving it. + /// without + /// moving it. kFlutterSemanticsActionTap = 1 << 0, /// The equivalent of a user pressing and holding the screen with the finger /// for a few seconds without moving it. @@ -171,8 +172,6 @@ typedef enum { kFlutterSemanticsFlagIsReadOnly = 1 << 20, /// Whether the semantic node can hold the user's focus. kFlutterSemanticsFlagIsFocusable = 1 << 21, - /// Whether the semantics node represents a link. - kFlutterSemanticsFlagIsLink = 1 << 22, } FlutterSemanticsFlag; typedef enum {