Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8451)

Unified Diff: chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc

Issue 931643003: Improve accessibility for the bookmark app bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc
diff --git a/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc b/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc
index 55e7b981844b877858cedc02e735d255dc47db01..71df060155324decf47f59a7444d231554c2b78f 100644
--- a/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc
+++ b/chrome/browser/ui/views/extensions/bookmark_app_bubble_view.cc
@@ -10,6 +10,7 @@
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/web_contents.h"
#include "extensions/common/constants.h"
+#include "ui/accessibility/ax_view_state.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/events/keycodes/keyboard_codes.h"
@@ -179,6 +180,8 @@ void BookmarkAppBubbleView::Init() {
title_tf_ = new views::Textfield();
title_tf_->SetText(web_app_info_.title);
+ title_tf_->SetAccessibleName(l10n_util::GetStringUTF16(
+ IDS_BOOKMARK_APP_AX_BUBBLE_NAME_LABEL));
title_tf_->set_controller(this);
layout->AddView(title_tf_);
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
@@ -213,6 +216,11 @@ bool BookmarkAppBubbleView::AcceleratorPressed(
return BubbleDelegateView::AcceleratorPressed(accelerator);
}
+void BookmarkAppBubbleView::GetAccessibleState(ui::AXViewState* state) {
+ views::BubbleDelegateView::GetAccessibleState(state);
+ state->name = l10n_util::GetStringUTF16(IDS_BOOKMARK_APP_BUBBLE_TITLE);
+}
+
gfx::Size BookmarkAppBubbleView::GetMinimumSize() const {
gfx::Size size(views::BubbleDelegateView::GetPreferredSize());
size.SetToMax(gfx::Size(kMinBubbleWidth, 0));
« no previous file with comments | « chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698