-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2011-03-29 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Chris Fleizach. AX: GTK: ARIA role is not respected on <p> <label> <div> and <form> https://bugs.webkit.org/show_bug.cgi?id=47636 Added new layout test to check that roles are correct in GTK. * platform/gtk/accessibility/aria-roles-unignored-expected.txt: Added. * platform/gtk/accessibility/aria-roles-unignored.html: Added. 2011-03-29 Mario Sanchez Prada <msanchez@igalia.com> Reviewed by Chris Fleizach. AX: GTK: ARIA role is not respected on <p> <label> <div> and <form> https://bugs.webkit.org/show_bug.cgi?id=47636 Define new roles in WebCore and map them to ATK accordingly. Test: platform/gtk/accessibility/aria-roles-unignored.html * accessibility/AccessibilityObject.h: Added new roles to represent paragraphs, labels, forms and div sections. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Return ParagraphRole, LabelRole, FormRole and DivRole when needed. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (atkRole): Map new WebCore roles to ATK Roles. (webkit_accessible_get_role): Remove code to define roles for paragraphs, labels, forms and divs based on node's tag name. Update mappings for the Mac platform. * accessibility/mac/AccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): Add explicit mappings from the new roles introduced to NSAccessibilityGroupRole. Canonical link: https://commits.webkit.org/72097@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
8 changed files
with
166 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Simple paragraph | ||
|
||
A paragraph pretending to be a table | ||
|
||
A label Who said label? It's a heading! | ||
A form with a button Click me! | ||
Just a button Click me! | ||
Just some text inside a div | ||
This div is contains a textbox (an entry) | ||
This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS element.role is 'AXRole: paragraph' | ||
PASS element.role is 'AXRole: table' | ||
PASS element.role is 'AXRole: label' | ||
PASS element.role is 'AXRole: heading' | ||
PASS element.role is 'AXRole: form' | ||
PASS element.role is 'AXRole: push button' | ||
PASS element.role is 'AXRole: panel' | ||
PASS element.role is 'AXRole: entry' | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
67 changes: 67 additions & 0 deletions
67
LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../fast/js/resources/js-test-style.css"> | ||
<script> | ||
var successfullyParsed = false; | ||
</script> | ||
<script src="../../../fast/js/resources/js-test-pre.js"></script> | ||
</head> | ||
<body id="body"> | ||
|
||
<p>Simple paragraph</p> | ||
<p role="grid">A paragraph pretending to be a table</p> | ||
|
||
<label>A label</label> | ||
<label role="heading">Who said label? It's a heading!</label> | ||
|
||
<form>A form with a button <button name="button" value="Button">Click me!</button></form> | ||
<form role="button">Just a button <button name="button" value="Button">Click me!</button></form> | ||
|
||
<div>Just some text inside a div</form> | ||
<div role="textbox">This div is contains a textbox (an entry)</div> | ||
|
||
<p id="description"></p> | ||
<div id="console"></div> | ||
<script> | ||
description("This tests that ARIA roles are not ignored for 'p','label', 'form' and 'div' elements"); | ||
|
||
if (window.layoutController) { | ||
layoutTestController.dumpAsText(); | ||
} | ||
|
||
if (window.accessibilityController) { | ||
document.getElementById("body").focus(); | ||
var webArea = accessibilityController.focusedElement; | ||
|
||
// Paragraphs | ||
var element = webArea.childAtIndex(0); | ||
shouldBe("element.role", "'AXRole: paragraph'"); | ||
element = webArea.childAtIndex(1); | ||
shouldBe("element.role", "'AXRole: table'"); | ||
|
||
// Labels are exposed as inside a panel | ||
var labelsPanel = webArea.childAtIndex(2); | ||
element = labelsPanel.childAtIndex(0); | ||
shouldBe("element.role", "'AXRole: label'"); | ||
element = labelsPanel.childAtIndex(1); | ||
shouldBe("element.role", "'AXRole: heading'"); | ||
|
||
// Forms | ||
element = webArea.childAtIndex(3); | ||
shouldBe("element.role", "'AXRole: form'"); | ||
element = webArea.childAtIndex(4); | ||
shouldBe("element.role", "'AXRole: push button'"); | ||
|
||
// Divs | ||
element = webArea.childAtIndex(5); | ||
shouldBe("element.role", "'AXRole: panel'"); | ||
element = webArea.childAtIndex(6); | ||
shouldBe("element.role", "'AXRole: entry'"); | ||
} | ||
|
||
successfullyParsed = true; | ||
</script> | ||
<script src="../../../fast/js/resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters