From f9204f0406b921905380f7e385bfdd41fb23a401 Mon Sep 17 00:00:00 2001 From: "ctguil@chromium.org" Date: Tue, 23 Mar 2010 16:28:53 +0000 Subject: views: [accessibility] Add accessible names for Minimize, Maximize, Restore buttons in the top right corner of the Window. BUG=9614 TEST=TEST=open AccExplorer, open the main chrome window, point it to one of the three buttons in the top-right corner, see if it shows the correct accessible names for each one. Patch from Thiago Farina Review URL: http://codereview.chromium.org/1076009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42349 0039d316-1c4b-4281-b951-d872f2087c98 --- views/window/custom_frame_view.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'views') diff --git a/views/window/custom_frame_view.cc b/views/window/custom_frame_view.cc index cf0fc49..1598bdd 100644 --- a/views/window/custom_frame_view.cc +++ b/views/window/custom_frame_view.cc @@ -79,6 +79,8 @@ CustomFrameView::CustomFrameView(Window* frame) // Close button images will be set in LayoutWindowControls(). AddChildView(close_button_); + restore_button_->SetAccessibleName( + l10n_util::GetString(IDS_APP_ACCNAME_RESTORE)); restore_button_->SetImage(CustomButton::BS_NORMAL, rb.GetBitmapNamed(IDR_RESTORE)); restore_button_->SetImage(CustomButton::BS_HOT, @@ -87,6 +89,8 @@ CustomFrameView::CustomFrameView(Window* frame) rb.GetBitmapNamed(IDR_RESTORE_P)); AddChildView(restore_button_); + maximize_button_->SetAccessibleName( + l10n_util::GetString(IDS_APP_ACCNAME_MAXIMIZE)); maximize_button_->SetImage(CustomButton::BS_NORMAL, rb.GetBitmapNamed(IDR_MAXIMIZE)); maximize_button_->SetImage(CustomButton::BS_HOT, @@ -95,6 +99,8 @@ CustomFrameView::CustomFrameView(Window* frame) rb.GetBitmapNamed(IDR_MAXIMIZE_P)); AddChildView(maximize_button_); + minimize_button_->SetAccessibleName( + l10n_util::GetString(IDS_APP_ACCNAME_MINIMIZE)); minimize_button_->SetImage(CustomButton::BS_NORMAL, rb.GetBitmapNamed(IDR_MINIMIZE)); minimize_button_->SetImage(CustomButton::BS_HOT, -- cgit v1.1