Index: content/browser/accessibility/browser_accessibility_win.cc |
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc |
index d40a576ae3b00685343a4bedaf148da7b0f5e4fd..3e1d8d0ef8ca90b16d61c58b80fa9c342bbc338f 100644 |
--- a/content/browser/accessibility/browser_accessibility_win.cc |
+++ b/content/browser/accessibility/browser_accessibility_win.cc |
@@ -203,6 +203,10 @@ enum { |
#define WIN_ACCESSIBILITY_API_HISTOGRAM(enum_value) \ |
UMA_HISTOGRAM_ENUMERATION("Accessibility.WinAPIs", enum_value, UMA_API_MAX) |
+const WCHAR *const IA2_DETAILS = L"details"; |
+const WCHAR *const IA2_DETAILS_FOR = L"detailsFor"; |
+const WCHAR *const IA2_ERROR_MESSAGE = L"errorMessage"; |
+ |
} // namespace |
namespace content { |
@@ -650,6 +654,11 @@ STDMETHODIMP BrowserAccessibilityWin::get_accKeyboardShortcut(VARIANT var_id, |
if (!target) |
return E_INVALIDARG; |
+ if (target->HasStringAttribute(ui::AX_ATTR_KEY_SHORTCUTS)) { |
+ return target->GetStringAttributeAsBstr( |
+ ui::AX_ATTR_KEY_SHORTCUTS, acc_key); |
+ } |
+ |
return target->GetStringAttributeAsBstr( |
ui::AX_ATTR_SHORTCUT, acc_key); |
} |
@@ -3898,11 +3907,17 @@ void BrowserAccessibilityWin::UpdateStep1ComputeWinAttributes() { |
ui::AX_ATTR_FLOWTO_IDS); |
AddBidirectionalRelations(IA2_RELATION_LABELLED_BY, IA2_RELATION_LABEL_FOR, |
ui::AX_ATTR_LABELLEDBY_IDS); |
+ AddBidirectionalRelations(IA2_RELATION_DETAILS, IA2_RELATION_DETAILS_FOR, |
+ ui::AX_ATTR_DETAILS_IDS); |
int member_of_id; |
if (GetIntAttribute(ui::AX_ATTR_MEMBER_OF_ID, &member_of_id)) |
AddRelation(IA2_RELATION_MEMBER_OF, member_of_id); |
+ int error_message_id; |
+ if (GetIntAttribute(ui::AX_ATTR_ERROR_MESSAGE, &error_message_id)) |
+ AddRelation(IA2_RELATION_ERROR_MESSAGE, &error_message_id); |
+ |
UpdateRequiredAttributes(); |
// If this is a web area for a presentational iframe, give it a role of |
// something other than DOCUMENT so that the fact that it's a separate doc |
@@ -5063,6 +5078,9 @@ void BrowserAccessibilityWin::InitRoleAndState() { |
if (!GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty()) |
ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION; |
+ if (HasIntAttribute(ui::AX_ATTR_MODAL)) |
+ ia2_state |= IA2_STATE_MODAL; |
+ |
base::string16 html_tag = GetString16Attribute( |
ui::AX_ATTR_HTML_TAG); |
switch (GetRole()) { |