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

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

Issue 1063383005: Chromium side Implementation to expose aria properties - setsize & posinset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 1d84b79e211f8e2c25a12a25274f8a3ccdf77a01..84bd345ad96c4b755df9857faaac99592f8f9852 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -3006,10 +3006,19 @@ void BrowserAccessibilityWin::UpdateStep1ComputeWinAttributes() {
if (GetRole() == ui::AX_ROLE_LIST_BOX_OPTION &&
GetParent() &&
GetParent()->GetRole() == ui::AX_ROLE_LIST_BOX) {
- win_attributes_->ia2_attributes.push_back(
- L"setsize:" + base::IntToString16(GetParent()->PlatformChildCount()));
- win_attributes_->ia2_attributes.push_back(
- L"setsize:" + base::IntToString16(GetIndexInParent() + 1));
+ if (HasIntAttribute(ui::AX_ATTR_SET_SIZE)){
+ IntAttributeToIA2(ui::AX_ATTR_SET_SIZE, "setsize");
+ } else {
+ win_attributes_->ia2_attributes.push_back(
+ L"setsize:" + base::IntToString16(GetParent()->PlatformChildCount()));
dmazzoni 2015/04/09 06:31:22 I think it'd be nicer if this logic was all done i
+ }
+
+ if (HasIntAttribute(ui::AX_ATTR_POS_IN_SET)){
+ IntAttributeToIA2(ui::AX_ATTR_POS_IN_SET, "posinset");
+ } else {
+ win_attributes_->ia2_attributes.push_back(
+ L"posinset:" + base::IntToString16(GetIndexInParent() + 1));
+ }
}
if (ia_role() == ROLE_SYSTEM_CHECKBUTTON ||

Powered by Google App Engine
This is Rietveld 408576698