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

Unified Diff: Source/core/accessibility/AXRenderObject.cpp

Issue 641053003: IA2 role is not correct for input type button and checkbox with aria role menu as parent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXRenderObject.cpp
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp
index 1f88247c3da8f881ef2a9dd149fb8e29bd4fd832..7ebc8c92d5a745f3bb463ff1ba0dddefff1db25e 100644
--- a/Source/core/accessibility/AXRenderObject.cpp
+++ b/Source/core/accessibility/AXRenderObject.cpp
@@ -314,12 +314,12 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
HTMLInputElement& input = toHTMLInputElement(*node);
const AtomicString& type = input.type();
if (type == InputTypeNames::button) {
- if (node->parentElement() && isHTMLMenuElement(node->parentElement()))
+ if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
return MenuItemRole;
return buttonRoleType();
}
if (type == InputTypeNames::checkbox) {
- if (node->parentElement() && isHTMLMenuElement(node->parentElement()))
+ if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
return CheckBoxMenuItemRole;
return CheckBoxRole;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698