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

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

Issue 699083007: Input type button in group role is not exposed correctly on Mac(blink) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updating correct condition Created 6 years, 1 month 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 | « Source/core/accessibility/AXNodeObject.cpp ('k') | 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 b66468d79180da9832394543b082c7a59fa4e3bb..63de5bcebab447585c8d6751c89442af8aca2a92 100644
--- a/Source/core/accessibility/AXRenderObject.cpp
+++ b/Source/core/accessibility/AXRenderObject.cpp
@@ -314,12 +314,14 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
HTMLInputElement& input = toHTMLInputElement(*node);
const AtomicString& type = input.type();
if (type == InputTypeNames::button) {
- if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
+ if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole))
return MenuItemRole;
+ if (parentObject() && parentObject()->ariaRoleAttribute() == GroupRole)
+ return MenuButtonRole;
return buttonRoleType();
}
if (type == InputTypeNames::checkbox) {
- if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
+ if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole))
return MenuItemCheckBoxRole;
return CheckBoxRole;
}
@@ -331,7 +333,7 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
|| type == InputTypeNames::week)
return DateTimeRole;
if (type == InputTypeNames::radio) {
- if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
+ if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->ariaRoleAttribute() == MenuRole))
return MenuItemRadioRole;
return RadioButtonRole;
}
« no previous file with comments | « Source/core/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698