Commit eb08d25f authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Tray: Update clear all notification tooltip to say number of notifications.

Because the notification count label is not focusable, when ChromeVox is
enabled, we should say the number of notifications upon focusing on the clear
all button.

TEST=manually verified
BUG=954688

Change-Id: I1e62053ff46a76fbfa775d31b5f33497eda00630
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577696Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653261}
parent d2ce9c20
...@@ -1712,6 +1712,9 @@ This file contains the strings for ash. ...@@ -1712,6 +1712,9 @@ This file contains the strings for ash.
<message name="IDS_ASH_MESSAGE_CENTER_HIDDEN_NOTIFICATION_COUNT_LABEL" desc="The label text the number of hidden notifications."> <message name="IDS_ASH_MESSAGE_CENTER_HIDDEN_NOTIFICATION_COUNT_LABEL" desc="The label text the number of hidden notifications.">
+<ph name="COUNT">$1<ex>2</ex></ph> more +<ph name="COUNT">$1<ex>2</ex></ph> more
</message> </message>
<message name="IDS_ASH_MESSAGE_CENTER_STACKING_BAR_CLEAR_ALL_BUTTON_TOOLTIP" desc="The tooltip text for the top clear all button, which also has the total number of notifications. Note: This button only appears when there are 2 or more notifications.">
Clear all <ph name="COUNT">$1<ex>2</ex></ph> notifications
</message>
<message name="IDS_ASH_MESSAGE_CENTER_SETTINGS_BUTTON_TOOLTIP" desc="The tooltip text for visiting the appropriate settings page in the footer of the message center."> <message name="IDS_ASH_MESSAGE_CENTER_SETTINGS_BUTTON_TOOLTIP" desc="The tooltip text for visiting the appropriate settings page in the footer of the message center.">
Settings Settings
</message> </message>
......
cb3227010be206339130ec7808f63055792dcbf2
\ No newline at end of file
...@@ -206,6 +206,13 @@ bool StackingNotificationCounterView::SetCount(int total_notification_count, ...@@ -206,6 +206,13 @@ bool StackingNotificationCounterView::SetCount(int total_notification_count,
if (features::IsNotificationStackingBarRedesignEnabled()) { if (features::IsNotificationStackingBarRedesignEnabled()) {
SetVisible(total_notification_count_ > 1); SetVisible(total_notification_count_ > 1);
auto tooltip = l10n_util::GetStringFUTF16Int(
IDS_ASH_MESSAGE_CENTER_STACKING_BAR_CLEAR_ALL_BUTTON_TOOLTIP,
total_notification_count_);
clear_all_button_->SetTooltipText(tooltip);
clear_all_button_->SetAccessibleName(tooltip);
if (stacked_notification_count_ > 0) { if (stacked_notification_count_ > 0) {
count_label_->SetText(l10n_util::GetStringFUTF16Int( count_label_->SetText(l10n_util::GetStringFUTF16Int(
IDS_ASH_MESSAGE_CENTER_HIDDEN_NOTIFICATION_COUNT_LABEL, IDS_ASH_MESSAGE_CENTER_HIDDEN_NOTIFICATION_COUNT_LABEL,
......
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