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

Unified Diff: Source/modules/accessibility/AXObject.cpp

Issue 783113002: Added test to check the state of ARIA checkboxes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tried to commit expectation file once again to have one as a new file not modified Created 6 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
« no previous file with comments | « LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXObject.cpp
diff --git a/Source/modules/accessibility/AXObject.cpp b/Source/modules/accessibility/AXObject.cpp
index 2185677552cafc4a1ddf8fcd6c0d33562d30ccd3..ceb74523b84fea23793723a2671ee7b098ae17fd 100644
--- a/Source/modules/accessibility/AXObject.cpp
+++ b/Source/modules/accessibility/AXObject.cpp
@@ -384,8 +384,12 @@ AccessibilityButtonState AXObject::checkboxOrRadioValue() const
const AtomicString& result = getAttribute(aria_checkedAttr);
if (equalIgnoringCase(result, "true"))
return ButtonStateOn;
- if (equalIgnoringCase(result, "mixed"))
+ if (equalIgnoringCase(result, "mixed")) {
+ AccessibilityRole role = ariaRoleAttribute();
+ if (role == RadioButtonRole || role == MenuItemRadioRole)
+ return ButtonStateOff;
return ButtonStateMixed;
+ }
return ButtonStateOff;
}
« no previous file with comments | « LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698