diff --git a/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java index 5df60b743cd..594ab345137 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -4,8 +4,6 @@ package io.flutter.view; -import static io.flutter.Build.API_LEVELS; - import android.annotation.SuppressLint; import android.app.Activity; import android.content.ContentResolver; @@ -38,7 +36,6 @@ import io.flutter.embedding.engine.systemchannels.AccessibilityChannel; import io.flutter.plugin.platform.PlatformViewsAccessibilityDelegate; import io.flutter.util.Predicate; import io.flutter.util.ViewUtils; -import io.flutter.view.AccessibilityBridge.Flag; import io.flutter.view.AccessibilityStringBuilder.LocaleStringAttribute; import io.flutter.view.AccessibilityStringBuilder.SpellOutStringAttribute; import io.flutter.view.AccessibilityStringBuilder.StringAttribute; @@ -95,7 +92,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { | Action.SCROLL_LEFT.value | Action.SCROLL_UP.value | Action.SCROLL_DOWN.value; - // Flags that make a node accessibilty focusable. + // Flags that make a node accessibility focusable. private static final int FOCUSABLE_FLAGS = Flag.HAS_CHECKED_STATE.value | Flag.IS_CHECKED.value @@ -519,7 +516,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { this.contentResolver.registerContentObserver(transitionUri, false, animationScaleObserver); // Tells Flutter whether the text should be bolded or not. If the user changes bold text - // setting, the configuration will change and trigger a re-build of the accesibiltyBridge. + // setting, the configuration will change and trigger a re-build of the accessibilityBridge. if (Build.VERSION.SDK_INT >= API_LEVELS.API_31) { setBoldTextFlag(); } @@ -730,7 +727,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { // // In this case, register the accessibility node in the view embedder, // so the accessibility tree can be mirrored as a subtree of the Flutter accessibility tree. - // This is in constrast to hybrid composition where the embedded view is in the view hiearchy, + // This is in contrast to hybrid composition where the embedded view is in the view hierarchy, // so it doesn't need to be mirrored. // // See the case down below for how hybrid composition is handled. @@ -2015,7 +2012,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { * *

This method sets accessibility panel title if the API level >= 28, otherwise, it creates a * {@link AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED} and sends the event to Android's - * accessibility system. In both cases, TalkBack announces the label of the route and re-addjusts + * accessibility system. In both cases, TalkBack announces the label of the route and re-adjusts * the accessibility focus. * *

The given {@code route} should be a {@link SemanticsNode} that represents a navigation route @@ -2024,7 +2021,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { private void onWindowNameChange(@NonNull SemanticsNode route) { String routeName = route.getRouteName(); if (routeName == null) { - // The routeName will be null when there is no semantics node that represnets namesRoute in + // The routeName will be null when there is no semantics node that represents namesRoute in // the scopeRoute. The TYPE_WINDOW_STATE_CHANGED only works the route name is not null and not // empty. Gives it a whitespace will make it focus the first semantics node without // pronouncing any word. @@ -2123,7 +2120,8 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { } // TODO(mattcarroll): should parent be set to "null" here? Changing the parent seems like the // behavior of a method called "removeSemanticsNode()". The same is true - // for null'ing accessibilityFocusedSemanticsNode, inputFocusedSemanticsNode, + // for nullifying accessibilityFocusedSemanticsNode, + // inputFocusedSemanticsNode, // and hoveredObject. Is this a hook method or a command? semanticsNodeToBeRemoved.parent = null; @@ -2587,7 +2585,7 @@ public class AccessibilityBridge extends AccessibilityNodeProvider { if (recursive) { String childIndent = indent + " "; for (SemanticsNode child : childrenInTraversalOrder) { - child.log(childIndent, recursive); + child.log(childIndent, true); } } }