Commit 30aff86c authored by Stephane Zermatten's avatar Stephane Zermatten Committed by Commit Bot

[Autofill Assistant] Disable overlay when talkback is activated.

Without this patch, the browser was never available when talkback was
on, because the web view detected the presence of the overlay and
assumed that the page was not available.

With this patch, the overlay is fully disabled when talkback is
activated if either:
- partial overlay is on (there is a touchable area, a portion of the
  page is available)
- the full overlay is off (the full page is available)
In these two cases, the page can be accessed via talkback.

Limitations:
- Controls are not available to talkback when full overlay is on.
- There is no filtering of the elements available to talkback when
partial overlay is on yet.

Bug: 806868
Change-Id: I77f88c8b4ba784a02306f14adf7e68d776e789ef
Reviewed-on: https://chromium-review.googlesource.com/c/1352171Reviewed-by: default avatarGanggui Tang <gogerald@chromium.org>
Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611172}
parent 30e1dd18
......@@ -22,6 +22,7 @@ import android.view.View;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
import org.chromium.chrome.browser.util.AccessibilityUtil;
import org.chromium.content_public.browser.GestureListenerManager;
import org.chromium.content_public.browser.GestureStateListener;
import org.chromium.content_public.browser.WebContents;
......@@ -238,6 +239,17 @@ public class TouchEventFilter
}
private void updateVisibility() {
if (AccessibilityUtil.isAccessibilityEnabled()) {
// Touch exploration is fully disabled if there's an overlay in front. In this case, the
// overlay must be fully gone and filtering elements for touch exploration must happen
// at another level.
//
// TODO(crbug.com/806868): filter elements available to touch exploration, when it
// is enabled.
setVisibility(
(mPartialOverlayEnabled || !mFullOverlayEnabled) ? View.GONE : View.VISIBLE);
}
setAlpha(isOverlayShown() ? 1.0f : 0.0f);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment