diff options
author | shreeram.k <shreeram.k@samsung.com> | 2014-09-30 13:04:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-30 20:05:11 +0000 |
commit | cfe6b43f2efb2a2212cf0abae532854778f5b68d (patch) | |
tree | 1cc9ed5481994cb153952ffbc5e54d125a757ae5 /content | |
parent | d0f39d853114654668a9e739823d005a6c7f5ac3 (diff) | |
download | chromium_src-cfe6b43f2efb2a2212cf0abae532854778f5b68d.zip chromium_src-cfe6b43f2efb2a2212cf0abae532854778f5b68d.tar.gz chromium_src-cfe6b43f2efb2a2212cf0abae532854778f5b68d.tar.bz2 |
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}
Diffstat (limited to 'content')
7 files changed, 51 insertions, 2 deletions
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc index 8ff0732..0fa33e9 100644 --- a/content/browser/accessibility/browser_accessibility_win.cc +++ b/content/browser/accessibility/browser_accessibility_win.cc @@ -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: diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index 4a5e955..011f58c 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc @@ -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")); } diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.cc b/content/renderer/accessibility/blink_ax_enum_conversion.cc index ffca006..91cdffc 100644 --- a/content/renderer/accessibility/blink_ax_enum_conversion.cc +++ b/content/renderer/accessibility/blink_ax_enum_conversion.cc @@ -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: diff --git a/content/test/data/accessibility/details-expected-android.txt b/content/test/data/accessibility/details-expected-android.txt new file mode 100644 index 0000000..1b9df1f --- /dev/null +++ b/content/test/data/accessibility/details-expected-android.txt @@ -0,0 +1,6 @@ +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.' diff --git a/content/test/data/accessibility/details-expected-mac.txt b/content/test/data/accessibility/details-expected-mac.txt new file mode 100644 index 0000000..0bb8e9e --- /dev/null +++ b/content/test/data/accessibility/details-expected-mac.txt @@ -0,0 +1,9 @@ +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.' diff --git a/content/test/data/accessibility/details-expected-win.txt b/content/test/data/accessibility/details-expected-win.txt new file mode 100644 index 0000000..e9aa155 --- /dev/null +++ b/content/test/data/accessibility/details-expected-win.txt @@ -0,0 +1,9 @@ +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.' diff --git a/content/test/data/accessibility/details.html b/content/test/data/accessibility/details.html new file mode 100644 index 0000000..6cbbdac --- /dev/null +++ b/content/test/data/accessibility/details.html @@ -0,0 +1,17 @@ +<!-- +@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> |