Commit 7528f407 authored by Gang Wu's avatar Gang Wu Committed by Commit Bot

Make sure TalkBack focused on entire of new incognito tab menu option

Bug: 1120273
Change-Id: I599b51cab1d6b61c47f98cb85c4c935adcf58d07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423354Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Gang Wu <gangwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809391}
parent 69dc7cf5
...@@ -52,7 +52,10 @@ class IncognitoMenuItemViewBinder implements CustomViewBinder { ...@@ -52,7 +52,10 @@ class IncognitoMenuItemViewBinder implements CustomViewBinder {
holder.title.setCompoundDrawablesRelative(item.getIcon(), null, null, null); holder.title.setCompoundDrawablesRelative(item.getIcon(), null, null, null);
holder.title.setEnabled(item.isEnabled()); holder.title.setEnabled(item.isEnabled());
holder.title.setFocusable(item.isEnabled()); // Setting |holder.title| to non-focusable will allow TalkBack highlighting the whole view
// of the menu item, not just title text.
holder.title.setFocusable(false);
convertView.setFocusable(item.isEnabled());
if (IncognitoUtils.isIncognitoModeManaged()) { if (IncognitoUtils.isIncognitoModeManaged()) {
holder.image.setVisibility(View.VISIBLE); holder.image.setVisibility(View.VISIBLE);
} }
......
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