summaryrefslogtreecommitdiffstats
path: root/views/accessibility
diff options
context:
space:
mode:
authordtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 20:37:10 +0000
committerdtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 20:37:10 +0000
commit091160623dcb93beea9d6159fef03d90f808ebd8 (patch)
treec21d87967a5370b8de3fdd75db0beea71abea8ac /views/accessibility
parent5f21cceea4596a9cbd73d4c1b225fff77595276d (diff)
downloadchromium_src-091160623dcb93beea9d6159fef03d90f808ebd8.zip
chromium_src-091160623dcb93beea9d6159fef03d90f808ebd8.tar.gz
chromium_src-091160623dcb93beea9d6159fef03d90f808ebd8.tar.bz2
Set focus to a ConfirmInfoBar. This serves to alerts screen reader users that the confirmation has appeared and alleviates the need to hunt for these controls.
BUG=37360 TEST=Confirm that focus lands correctly on the "save" button when logging into a site and offer to save passwords is enabled. Review URL: http://codereview.chromium.org/3405026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/accessibility')
-rw-r--r--views/accessibility/accessibility_types.h2
-rw-r--r--views/accessibility/view_accessibility.cc4
2 files changed, 6 insertions, 0 deletions
diff --git a/views/accessibility/accessibility_types.h b/views/accessibility/accessibility_types.h
index 4470344..b30208f 100644
--- a/views/accessibility/accessibility_types.h
+++ b/views/accessibility/accessibility_types.h
@@ -47,6 +47,7 @@ class AccessibilityTypes {
// must provide a conversion to its own roles (see e.g.
// ViewAccessibility::get_accRole and ViewAccessibility::MSAARole).
enum Role {
+ ROLE_ALERT,
ROLE_APPLICATION,
ROLE_BUTTONDROPDOWN,
ROLE_BUTTONMENU,
@@ -82,6 +83,7 @@ class AccessibilityTypes {
// events must provide a conversion to its own events (see e.g.
// ViewAccessibility::MSAAEvent).
enum Event {
+ EVENT_ALERT,
EVENT_FOCUS,
EVENT_MENUSTART,
EVENT_MENUEND,
diff --git a/views/accessibility/view_accessibility.cc b/views/accessibility/view_accessibility.cc
index 07eec0d..985097f 100644
--- a/views/accessibility/view_accessibility.cc
+++ b/views/accessibility/view_accessibility.cc
@@ -675,6 +675,8 @@ STDMETHODIMP ViewAccessibility::put_accValue(VARIANT var_id, BSTR put_val) {
int32 ViewAccessibility::MSAAEvent(AccessibilityTypes::Event event) {
switch (event) {
+ case AccessibilityTypes::EVENT_ALERT:
+ return EVENT_SYSTEM_ALERT;
case AccessibilityTypes::EVENT_FOCUS:
return EVENT_OBJECT_FOCUS;
case AccessibilityTypes::EVENT_MENUSTART:
@@ -694,6 +696,8 @@ int32 ViewAccessibility::MSAAEvent(AccessibilityTypes::Event event) {
int32 ViewAccessibility::MSAARole(AccessibilityTypes::Role role) {
switch (role) {
+ case AccessibilityTypes::ROLE_ALERT:
+ return ROLE_SYSTEM_ALERT;
case AccessibilityTypes::ROLE_APPLICATION:
return ROLE_SYSTEM_APPLICATION;
case AccessibilityTypes::ROLE_BUTTONDROPDOWN: