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 6040ef8facf90caa002fe36cfb3cdfdb614f911f..59f59b837fac3a6e10b54dd8493951895ebd978b 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_RELATION_DETAILS = L"details"; |
+const WCHAR *const IA2_RELATION_DETAILS_FOR = L"detailsFor"; |
+const WCHAR *const IA2_RELATION_ERROR_MESSAGE = L"errorMessage"; |
+ |
} // namespace |
namespace content { |
@@ -655,6 +659,11 @@ STDMETHODIMP BrowserAccessibilityWin::get_accKeyboardShortcut(VARIANT var_id, |
if (!target) |
return E_INVALIDARG; |
+ if (target->HasStringAttribute(ui::AX_ATTR_KEY_SHORTCUTS)) { |
aboxhall
2017/02/08 02:35:18
Should roledescription go in here somewhere as wel
dmazzoni
2017/02/09 18:22:42
Oh yeah, it should.
The spec says localizedExtend
|
+ return target->GetStringAttributeAsBstr( |
+ ui::AX_ATTR_KEY_SHORTCUTS, acc_key); |
+ } |
+ |
return target->GetStringAttributeAsBstr( |
ui::AX_ATTR_SHORTCUT, acc_key); |
} |
@@ -4025,11 +4034,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_ERRORMESSAGE_ID, &error_message_id)) |
+ AddRelation(IA2_RELATION_ERROR_MESSAGE, error_message_id); |
+ |
// Expose slider value. |
if (ia_role() == ROLE_SYSTEM_PROGRESSBAR || |
ia_role() == ROLE_SYSTEM_SCROLLBAR || |
@@ -5205,6 +5220,9 @@ void BrowserAccessibilityWin::InitRoleAndState() { |
if (!GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty()) |
ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION; |
+ if (GetBoolAttribute(ui::AX_ATTR_MODAL)) |
+ ia2_state |= IA2_STATE_MODAL; |
+ |
base::string16 html_tag = GetString16Attribute( |
ui::AX_ATTR_HTML_TAG); |
switch (GetRole()) { |