Index: Source/core/accessibility/AXNodeObject.cpp |
diff --git a/Source/core/accessibility/AXNodeObject.cpp b/Source/core/accessibility/AXNodeObject.cpp |
index 28f096c7cddb160b66987da39743d3398478b60f..571e5a23f8e60a296b5f025906ec007ad255bcc6 100644 |
--- a/Source/core/accessibility/AXNodeObject.cpp |
+++ b/Source/core/accessibility/AXNodeObject.cpp |
@@ -204,12 +204,12 @@ AccessibilityRole AXNodeObject::determineAccessibilityRole() |
HTMLInputElement& input = toHTMLInputElement(*node()); |
const AtomicString& type = input.type(); |
if (type == InputTypeNames::button) { |
- if (node()->parentNode() && isHTMLMenuElement(node()->parentNode())) |
+ if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole)) |
return MenuItemRole; |
return buttonRoleType(); |
} |
if (type == InputTypeNames::checkbox) { |
- if (node()->parentNode() && isHTMLMenuElement(node()->parentNode())) |
+ if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole)) |
return CheckBoxMenuItemRole; |
return CheckBoxRole; |
} |