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

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

Issue 589383004: IA2 role is not correct for input type attribute in button and checkbox state with menu as parent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
Index: Source/core/accessibility/AXRenderObject.cpp
diff --git a/Source/core/accessibility/AXRenderObject.cpp b/Source/core/accessibility/AXRenderObject.cpp
index 872cd1eb066051384e7aa4c3dfb2691253f5a435..9a8f4c58263f072b31ff1800af2e8f0d7923cb34 100644
--- a/Source/core/accessibility/AXRenderObject.cpp
+++ b/Source/core/accessibility/AXRenderObject.cpp
@@ -313,8 +313,16 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
if (isHTMLInputElement(node)) {
HTMLInputElement& input = toHTMLInputElement(*node);
const AtomicString& type = input.type();
- if (type == InputTypeNames::checkbox)
+ if (type == InputTypeNames::button) {
+ if (node->parentElement() && isHTMLMenuElement(node->parentElement()))
+ return MenuItemRole;
+ return buttonRoleType();
+ }
+ if (type == InputTypeNames::checkbox) {
+ if (node->parentElement() && isHTMLMenuElement(node->parentElement()))
+ return MenuItemRole;
return CheckBoxRole;
+ }
if (type == InputTypeNames::radio)
return RadioButtonRole;
if (input.isTextButton())
« Source/core/accessibility/AXNodeObject.cpp ('K') | « Source/core/accessibility/AXNodeObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698