Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 2587343004: Finish implementation and tests of 5 ARIA 1.1 attributes. (Closed)
Patch Set: Rebase on previous change Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()) {

Powered by Google App Engine
This is Rietveld 408576698