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; |