Input type attribue in radio button state with menu as parent should be exposed with correct IA2

This is blink side CL to expose input type radio button with menu as parent with
correct IA2 role similar to aria role menuitemradio.

BUG=422879

Review URL: https://codereview.chromium.org/651893002

git-svn-id: svn://svn.chromium.org/blink/trunk@183622 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 24d71b03
......@@ -220,8 +220,11 @@ AccessibilityRole AXNodeObject::determineAccessibilityRole()
|| type == InputTypeNames::month
|| type == InputTypeNames::week)
return DateTimeRole;
if (type == InputTypeNames::radio)
if (type == InputTypeNames::radio) {
if ((node()->parentNode() && isHTMLMenuElement(node()->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
return MenuItemRadioRole;
return RadioButtonRole;
}
if (input.isTextButton())
return buttonRoleType();
if (type == InputTypeNames::range)
......
......@@ -330,8 +330,11 @@ AccessibilityRole AXRenderObject::determineAccessibilityRole()
|| type == InputTypeNames::month
|| type == InputTypeNames::week)
return DateTimeRole;
if (type == InputTypeNames::radio)
if (type == InputTypeNames::radio) {
if ((node->parentNode() && isHTMLMenuElement(node->parentNode())) || (parentObject() && parentObject()->roleValue() == MenuRole))
return MenuItemRadioRole;
return RadioButtonRole;
}
if (input.isTextButton())
return buttonRoleType();
if (type == InputTypeNames::color)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment