From 8c157cf900b7ae30185b4905ac51c39dfc2c90ad Mon Sep 17 00:00:00 2001 From: "ctguil@chromium.org" Date: Mon, 22 Mar 2010 22:34:54 +0000 Subject: views: [accessibility] Add accessible name for the Close button in generic Window. BUG=9614 TEST=open AccExplorer, open a dialog window, point it to the Close button in the top-right corner, see if it shows Close as the accessible name. Patch from Thiago Farina Review URL: http://codereview.chromium.org/1155005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42270 0039d316-1c4b-4281-b951-d872f2087c98 --- views/window/custom_frame_view.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc index e45b998..d3d256f 100644 --- a/views/window/custom_frame_view.cc +++ b/views/window/custom_frame_view.cc @@ -6,6 +6,7 @@ #include "app/gfx/canvas.h" #include "app/gfx/font.h" +#include "app/l10n_util.h" #include "app/resource_bundle.h" #include "app/theme_provider.h" #if defined(OS_WIN) @@ -14,6 +15,7 @@ #endif #include "gfx/path.h" #include "grit/app_resources.h" +#include "grit/app_strings.h" #include "views/window/client_view.h" #if defined(OS_LINUX) #include "views/window/hit_test.h" @@ -72,6 +74,8 @@ CustomFrameView::CustomFrameView(Window* frame) ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + close_button_->SetAccessibleName(l10n_util::GetString(IDS_APP_ACCNAME_CLOSE)); + // Close button images will be set in LayoutWindowControls(). AddChildView(close_button_); @@ -569,7 +573,7 @@ void CustomFrameView::InitClass() { #if defined(OS_WIN) title_font_ = new gfx::Font(win_util::GetWindowTitleFont()); #elif defined(OS_LINUX) - // TODO: need to resolve what font this is. + // TODO(ben): need to resolve what font this is. title_font_ = new gfx::Font(); #endif initialized = true; -- cgit v1.1