Commit 31082d0f authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Update incognito toolbar button's accessible title.

Accessible name of incognito menu is updated to tell the number of open
incognito windows when incognito window counter is active.

Bug: 896235
Change-Id: I16deed985d9cf8170d6739f083f0c352df44c435
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1569932Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652521}
parent f2b46d89
......@@ -133,8 +133,12 @@ void AvatarToolbarButton::UpdateText() {
if (IsIncognito()) {
int incognito_window_count =
BrowserList::GetIncognitoSessionsActiveForProfile(profile_);
if (!IsIncognitoCounterActive())
if (IsIncognitoCounterActive()) {
SetAccessibleName(l10n_util::GetPluralStringFUTF16(
IDS_INCOGNITO_BUBBLE_ACCESSIBLE_TITLE, incognito_window_count));
} else {
incognito_window_count = 1;
}
text = l10n_util::GetPluralStringFUTF16(IDS_AVATAR_BUTTON_INCOGNITO,
incognito_window_count);
} else if (sync_state == SyncState::kError) {
......
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