Commit c974f468 authored by Sarah Chan's avatar Sarah Chan Committed by Commit Bot

[Views] Add Accessibility Text to App Menu Button

The App Menu Button AX text currently don't report if an
update is available. This CL fixes the issue by adding
"Update is available" to the AX text.

Bug: 770745
Change-Id: I9e0768d21667c2b986ad7a5bc17c75f37b0bcb4d
Reviewed-on: https://chromium-review.googlesource.com/869113Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Sarah Chan <spqchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530720}
parent 286c8046
......@@ -584,6 +584,10 @@ Chromium is unable to recover your settings.
Customize and control Chromium
</message>
<message name="IDS_APPMENU_TOOLTIP_UPDATE_AVAILABLE" desc="The tooltip to show for the browser menu when an update is available">
Customize and control Chromium. Update is available.
</message>
<message name="IDS_OPEN_IN_CHROME" desc="The text label of the Open in Chrome menu item for the Hosted App app menu">
&amp;Open in Chromium
</message>
......
......@@ -594,6 +594,10 @@ Google Chrome is unable to recover your settings.
Customize and control Google Chrome
</message>
<message name="IDS_APPMENU_TOOLTIP_UPDATE_AVAILABLE" desc="The tooltip to show for the browser menu when an update is available">
Customize and control Google Chrome. Update is available.
</message>
<message name="IDS_OPEN_IN_CHROME" desc="The text label of the Open in Chrome menu item for the Hosted App app menu">
&amp;Open in Chrome
</message>
......
......@@ -26,6 +26,8 @@
#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/common/chrome_features.h"
#include "chrome/grit/chromium_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/canvas.h"
......@@ -75,6 +77,11 @@ void AppMenuButton::SetSeverity(AppMenuIconController::IconType type,
bool animate) {
type_ = type;
severity_ = severity;
SetTooltipText(
severity_ == AppMenuIconController::Severity::NONE
? l10n_util::GetStringUTF16(IDS_APPMENU_TOOLTIP)
: l10n_util::GetStringUTF16(IDS_APPMENU_TOOLTIP_UPDATE_AVAILABLE));
UpdateIcon(animate);
}
......
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