From c944e9d36360456aef0aef85a1d11612f554c1a7 Mon Sep 17 00:00:00 2001 From: "dtseng@chromium.org" Date: Tue, 28 Jan 2014 23:56:24 +0000 Subject: Enable root focus on page load on Android. Behavior: - navigate to a page - do not touch the web view result: focus is placed on the root of the web contents (and TalkBack reads the title of the page). Note that if the web view is touched during load, focus is not changed. BUG=none Review URL: https://codereview.chromium.org/137113002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247531 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/accessibility/BrowserAccessibilityManager.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java index 2327316..e0ce947 100644 --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/BrowserAccessibilityManager.java @@ -49,11 +49,6 @@ public class BrowserAccessibilityManager { private boolean mPendingScrollToMakeNodeVisible; private boolean mFrameInfoInitialized; - // If this is true, enables an experimental feature that focuses the web page after it - // finishes loading. Disabled for now because it can be confusing if the user was - // trying to do something when this happens. - private boolean mFocusPageOnLoad; - /** * Create a BrowserAccessibilityManager object, which is owned by the C++ * BrowserAccessibilityManagerAndroid instance, and connects to the content view. @@ -334,12 +329,8 @@ public class BrowserAccessibilityManager { private void handlePageLoaded(int id) { if (mUserHasTouchExplored) return; - if (mFocusPageOnLoad) { - // Focus the natively focused node (usually document), - // if this feature is enabled. - mAccessibilityFocusId = id; - sendAccessibilityEvent(id, AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED); - } + mAccessibilityFocusId = id; + sendAccessibilityEvent(id, AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED); } @CalledByNative -- cgit v1.1