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

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

Issue 1511603002: Merge to m48: Stops using SYSTEM_STATE_INDETERMINATE as it makes radio buttons appear to have a mix… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 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: third_party/WebKit/Source/modules/accessibility/AXObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index a42851d0de31cac768b73194897a01fab759e9e3..d4d275322939f8d6f3d90cd17971ad78c0f0e6ee 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -751,17 +751,15 @@ String AXObject::actionVerb() const
AccessibilityButtonState AXObject::checkboxOrRadioValue() const
{
- // If this is a real checkbox or radio button, AXLayoutObject will handle.
- // If it's an ARIA checkbox or radio, the aria-checked attribute should be used.
-
- const AtomicString& result = getAttribute(aria_checkedAttr);
- if (equalIgnoringCase(result, "true"))
+ const AtomicString& checkedAttribute = getAttribute(aria_checkedAttr);
+ if (equalIgnoringCase(checkedAttribute, "true"))
return ButtonStateOn;
- if (equalIgnoringCase(result, "mixed")) {
+
+ if (equalIgnoringCase(checkedAttribute, "mixed")) {
+ // Only checkboxes should support the mixed state.
AccessibilityRole role = ariaRoleAttribute();
- if (role == RadioButtonRole || role == MenuItemRadioRole || role == SwitchRole)
- return ButtonStateOff;
- return ButtonStateMixed;
+ if (role == CheckBoxRole || role == MenuItemCheckBoxRole)
+ return ButtonStateMixed;
}
return ButtonStateOff;
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | third_party/WebKit/Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698