diff options
author | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 03:41:07 +0000 |
---|---|---|
committer | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 03:41:07 +0000 |
commit | 1080ad56b8eef8873ce0cfd6ab004643c371c29a (patch) | |
tree | 41b9a631cdd1c8df53f060d1b7b22163ec19fb0f | |
parent | f67c72d75253f3ce46641fa7226169a9e016e59c (diff) | |
download | chromium_src-1080ad56b8eef8873ce0cfd6ab004643c371c29a.zip chromium_src-1080ad56b8eef8873ce0cfd6ab004643c371c29a.tar.gz chromium_src-1080ad56b8eef8873ce0cfd6ab004643c371c29a.tar.bz2 |
Fix to correctly set accessible state of StatusAreaBubbleContentView
BUG=chromium-os:22051
TEST=Enable spoken feedback and focus on battery icon on the status area. Press down arrow key twice and ensure that it speaks "Charging Battery full" or something like that.
Review URL: http://codereview.chromium.org/8511004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110033 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/status/status_area_bubble.cc | 8 | ||||
-rw-r--r-- | chrome/browser/chromeos/status/status_area_bubble.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/status/status_area_bubble.cc b/chrome/browser/chromeos/status/status_area_bubble.cc index 8dacfdc..1d6f3dc 100644 --- a/chrome/browser/chromeos/status/status_area_bubble.cc +++ b/chrome/browser/chromeos/status/status_area_bubble.cc @@ -7,6 +7,7 @@ #include "views/controls/label.h" #include "views/layout/box_layout.h" #include "views/layout/fill_layout.h" +#include "ui/base/accessibility/accessible_view_state.h" namespace chromeos { @@ -67,6 +68,13 @@ void StatusAreaBubbleContentView::SetMessage(const string16& message) { message_view_->SetText(message); } +void StatusAreaBubbleContentView::GetAccessibleState( + ui::AccessibleViewState* state) { + state->role = ui::AccessibilityTypes::ROLE_STATICTEXT; + state->state = ui::AccessibilityTypes::STATE_READONLY; + state->name = GetMessage(); +} + StatusAreaBubbleController::StatusAreaBubbleController() : bubble_(NULL), content_(NULL) { diff --git a/chrome/browser/chromeos/status/status_area_bubble.h b/chrome/browser/chromeos/status/status_area_bubble.h index dba5939..7935494 100644 --- a/chrome/browser/chromeos/status/status_area_bubble.h +++ b/chrome/browser/chromeos/status/status_area_bubble.h @@ -30,6 +30,9 @@ class StatusAreaBubbleContentView : public views::View { views::View* icon_view() const { return icon_view_; } + // views::View override + virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; + private: views::View* icon_view_; views::Label* message_view_; |