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

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

Issue 1162263008: Exposes datetime attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: re-upload due to browser_accessibility_cocoa.mm Created 5 years, 6 months 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 6866ca987cf702d1326e51bc20a79c2c27a60062..3c79052a320f42a5f8180a3876a2e345f5f7f9cd 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -3173,8 +3173,6 @@ void BrowserAccessibilityWin::UpdateStep1ComputeWinAttributes() {
// Expose the "display" and "tag" attributes.
StringAttributeToIA2(ui::AX_ATTR_DISPLAY, "display");
- StringAttributeToIA2(ui::AX_ATTR_DROPEFFECT, "dropeffect");
- StringAttributeToIA2(ui::AX_ATTR_TEXT_INPUT_TYPE, "text-input-type");
StringAttributeToIA2(ui::AX_ATTR_HTML_TAG, "tag");
StringAttributeToIA2(ui::AX_ATTR_ROLE, "xml-roles");
@@ -3199,9 +3197,6 @@ void BrowserAccessibilityWin::UpdateStep1ComputeWinAttributes() {
BoolAttributeToIA2(ui::AX_ATTR_LIVE_ATOMIC, "atomic");
BoolAttributeToIA2(ui::AX_ATTR_LIVE_BUSY, "busy");
- // Expose aria-grabbed attributes.
- BoolAttributeToIA2(ui::AX_ATTR_GRABBED, "grabbed");
-
// Expose container live region attributes.
StringAttributeToIA2(ui::AX_ATTR_CONTAINER_LIVE_STATUS,
"container-live");
@@ -3407,6 +3402,28 @@ void BrowserAccessibilityWin::UpdateStep1ComputeWinAttributes() {
win_attributes_->ia2_attributes.push_back(L"valuetext:" + GetValueText());
}
+ // Expose dropeffect attribute.
dmazzoni 2015/06/09 16:23:32 What do you think of just iterating over all HTML
je_julie(Not used) 2015/06/10 02:16:31 When I looking into the inspection result from Acc
+ base::string16 dropEffect;
+ if (GetHtmlAttribute("aria-dropeffect", &dropEffect))
+ win_attributes_->ia2_attributes.push_back(L"dropeffect:" + dropEffect);
+
+ // Expose grabbed attribute.
+ base::string16 grabbed;
+ if (GetHtmlAttribute("aria-grabbed", &grabbed))
+ win_attributes_->ia2_attributes.push_back(L"grabbed:" + grabbed);
+
+ // Expose datetime attribute.
+ base::string16 datetime;
+ if (GetRole() == ui::AX_ROLE_TIME &&
+ GetHtmlAttribute("datetime", &datetime))
+ win_attributes_->ia2_attributes.push_back(L"datetime:" + datetime);
+
+ // Expose input-text type attribute.
+ base::string16 type;
+ if (GetRole() == ui::AX_ROLE_TEXT_FIELD &&
+ GetHtmlAttribute("type", &type))
+ win_attributes_->ia2_attributes.push_back(L"text-input-type:" + type);
+
// 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
// is not exposed to AT.
@@ -4285,6 +4302,7 @@ void BrowserAccessibilityWin::InitRoleAndState() {
ia2_state |= IA2_STATE_SELECTABLE_TEXT;
break;
case ui::AX_ROLE_TIME:
+ role_name = html_tag;
ia_role = ROLE_SYSTEM_TEXT;
ia2_role = IA2_ROLE_TEXT_FRAME;
break;

Powered by Google App Engine
This is Rietveld 408576698