Commit ed923038 authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Horizontal tab switcher toggle announce for accessibility

Announce for accessibility when the normal or incognito tab stack
is selected.

Bug: 892638
Change-Id: I8ca8e37d8374e5f57e8b4ef5181c05d00322158e
Reviewed-on: https://chromium-review.googlesource.com/c/1265031Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597348}
parent 164391c5
...@@ -137,5 +137,12 @@ public class IncognitoToggleTabLayout extends TabLayout { ...@@ -137,5 +137,12 @@ public class IncognitoToggleTabLayout extends TabLayout {
mTabModelSelector.commitAllTabClosures(); mTabModelSelector.commitAllTabClosures();
mTabModelSelector.selectModel(incognitoSelected); mTabModelSelector.selectModel(incognitoSelected);
final int stackAnnouncementId = incognitoSelected
? (ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_STRINGS)
? R.string.accessibility_tab_switcher_private_stack_selected
: R.string.accessibility_tab_switcher_incognito_stack_selected)
: R.string.accessibility_tab_switcher_standard_stack_selected;
announceForAccessibility(getResources().getString(stackAnnouncementId));
} }
} }
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