Commit cfe6b43f authored by shreeram.k's avatar shreeram.k Committed by Commit bot

Adds conversion rule for WebAXRoleDetails

This CL depends on blink side CL https://codereview.chromium.org/590183003/

BUG=282016

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

Cr-Commit-Position: refs/heads/master@{#297488}
parent d0f39d85
......@@ -3456,13 +3456,15 @@ void BrowserAccessibilityWin::InitRoleAndState() {
ia_role_ = ROLE_SYSTEM_LISTITEM;
ia_state_ |= STATE_SYSTEM_READONLY;
break;
case ui::AX_ROLE_DETAILS:
ia_role_ = ROLE_SYSTEM_GROUPING;
break;
case ui::AX_ROLE_DIALOG:
ia_role_ = ROLE_SYSTEM_DIALOG;
ia_state_ |= STATE_SYSTEM_READONLY;
break;
case ui::AX_ROLE_DISCLOSURE_TRIANGLE:
ia_role_ = ROLE_SYSTEM_OUTLINEBUTTON;
ia_state_ |= STATE_SYSTEM_READONLY;
ia_role_ = ROLE_SYSTEM_PUSHBUTTON;
break;
case ui::AX_ROLE_DOCUMENT:
case ui::AX_ROLE_ROOT_WEB_AREA:
......
......@@ -511,6 +511,10 @@ IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityDel) {
RunTest(FILE_PATH_LITERAL("del.html"));
}
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityDetails) {
RunTest(FILE_PATH_LITERAL("details.html"));
}
IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityDfn) {
RunTest(FILE_PATH_LITERAL("dfn.html"));
}
......
......@@ -124,6 +124,8 @@ ui::AXRole AXRoleFromBlink(blink::WebAXRole role) {
return ui::AX_ROLE_DESCRIPTION_LIST_DETAIL;
case blink::WebAXRoleDescriptionListTerm:
return ui::AX_ROLE_DESCRIPTION_LIST_TERM;
case blink::WebAXRoleDetails:
return ui::AX_ROLE_DETAILS;
case blink::WebAXRoleDialog:
return ui::AX_ROLE_DIALOG;
case blink::WebAXRoleDirectory:
......
android.webkit.WebView focusable focused scrollable
android.view.View
android.view.View clickable focusable name='details tag'
android.view.View
android.view.View clickable focusable name='details tag open'
android.view.View clickable name='The details tag with open specifies that the details should be visible (open) to the user.'
AXWebArea AXRoleDescription='HTML content'
AXGroup AXRoleDescription='group'
AXDisclosureTriangle AXRoleDescription='disclosure triangle' AXTitle='details tag'
AXStaticText AXRoleDescription='text' AXValue='details tag'
AXGroup AXRoleDescription='group'
AXDisclosureTriangle AXRoleDescription='disclosure triangle' AXTitle='details tag open'
AXStaticText AXRoleDescription='text' AXValue='details tag open'
AXGroup AXRoleDescription='group'
AXStaticText AXRoleDescription='text' AXValue='The details tag with open specifies that the details should be visible (open) to the user.'
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE
ROLE_SYSTEM_GROUPING
ROLE_SYSTEM_PUSHBUTTON name='details tag' FOCUSABLE
ROLE_SYSTEM_STATICTEXT name='details tag'
ROLE_SYSTEM_GROUPING
ROLE_SYSTEM_PUSHBUTTON name='details tag open' FOCUSABLE
ROLE_SYSTEM_STATICTEXT name='details tag open'
IA2_ROLE_PARAGRAPH
ROLE_SYSTEM_STATICTEXT name='The details tag with open specifies that the details should be visible (open) to the user.'
<!--
@MAC-ALLOW:AXRole*
-->
<!DOCTYPE html>
<html>
<body>
<details>
<summary>details tag</summary>
<p>The details tag specifies additional details that the user can view or hide on demand.</p>
</details>
<details open>
<summary>details tag open</summary>
<p>The details tag with open specifies that the details should be visible (open) to the user.</p>
</details>
</body>
</html>
......@@ -84,6 +84,7 @@
description_list_detail,
description_list_term,
desktop,
details,
dialog,
directory,
disclosure_triangle,
......
......@@ -43,6 +43,7 @@ RoleMap BuildRoleMap() {
{ui::AX_ROLE_DESCRIPTION_LIST_DETAIL, NSAccessibilityGroupRole},
{ui::AX_ROLE_DESCRIPTION_LIST_TERM, NSAccessibilityGroupRole},
{ui::AX_ROLE_DIALOG, NSAccessibilityGroupRole},
{ui::AX_ROLE_DETAILS, NSAccessibilityGroupRole},
{ui::AX_ROLE_DIRECTORY, NSAccessibilityListRole},
{ui::AX_ROLE_DISCLOSURE_TRIANGLE, NSAccessibilityDisclosureTriangleRole},
{ui::AX_ROLE_DIV, NSAccessibilityGroupRole},
......
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