Commit 19346c9c authored by eric@webkit.org's avatar eric@webkit.org

2010-03-06 Joanmarie Diggs <joanmarie.diggs@gmail.com>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=30895
        [Gtk] The accessible hierarchy of tables is significantly incorrect for Atk

        * platform/gtk/accessibility/table-hierarchy.html: Added.
        * platform/gtk/accessibility/table-hierarchy-expected.txt: Added.
2010-03-06  Joanmarie Diggs  <joanmarie.diggs@gmail.com>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=30895
        [Gtk] The accessible hierarchy of tables is significantly incorrect for Atk

        This completes the fixing of the Atk table hierarchy which was started
        in bug #35418.

        * accessibility/gtk/AccessibilityObjectAtk.cpp:
        (AccessibilityObject::accessibilityPlatformIncludesObject):
        * accessibility/AccessibilityRenderObject.cpp:
        (AccessibilityRenderObject::determineAccessibilityRole):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4a505610
2010-03-06 Joanmarie Diggs <joanmarie.diggs@gmail.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=30895
[Gtk] The accessible hierarchy of tables is significantly incorrect for Atk
* platform/gtk/accessibility/table-hierarchy.html: Added.
* platform/gtk/accessibility/table-hierarchy-expected.txt: Added.
2010-03-06 Hironori Bono <hbono@chromium.org>
Reviewed by Eric Seidel.
......
foo bar
Odd Even
1 2
3 4
hello world
This tests the Atk table hierarhy.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS table1.role is 'table'
PASS table2.role is 'table'
PASS table3.role is 'table'
PASS children is 2
PASS table1.childAtIndex(i).role is 'table cell'
PASS table1.childAtIndex(i).role is 'table cell'
PASS children is 6
PASS table2.childAtIndex(i).role is 'table cell'
PASS table2.childAtIndex(i).role is 'table cell'
PASS table2.childAtIndex(i).role is 'table cell'
PASS table2.childAtIndex(i).role is 'table cell'
PASS table2.childAtIndex(i).role is 'table cell'
PASS table2.childAtIndex(i).role is 'table cell'
PASS children is 2
PASS table3.childAtIndex(i).role is 'table cell'
PASS table3.childAtIndex(i).role is 'table cell'
PASS successfullyParsed is true
TEST COMPLETE
<!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">
<table>
<tr><td>foo</td><td>bar</td></tr>
</table>
<table>
<tr><th>Odd</th><th>Even</th></tr>
<tr><td>1</td><td>2</td></tr>
<tr><td>3</td><td>4</td></tr>
</table>
<table>
<tbody>
<tr><td>hello</td><td>world</td></tr>
</tbody>
</table>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests the Atk table hierarhy.");
if (window.accessibilityController) {
layoutTestController.dumpAsText();
document.getElementById("body").focus();
var webArea = accessibilityController.focusedElement;
var table1 = webArea.childAtIndex(0);
shouldBe("table1.role", "'table'");
var table2 = webArea.childAtIndex(1);
shouldBe("table2.role", "'table'");
var table3 = webArea.childAtIndex(2);
shouldBe("table3.role", "'table'");
var children = table1.childrenCount;
shouldBe("children", "2");
for (i = 0; i < children; ++i) {
shouldBe("table1.childAtIndex(i).role", "'table cell'");
}
children = table2.childrenCount;
shouldBe("children", "6");
for (i = 0; i < children; ++i) {
shouldBe("table2.childAtIndex(i).role", "'table cell'");
}
children = table3.childrenCount;
shouldBe("children", "2");
for (i = 0; i < children; ++i) {
shouldBe("table3.childAtIndex(i).role", "'table cell'");
}
}
successfullyParsed = true;
</script>
<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
2010-03-06 Joanmarie Diggs <joanmarie.diggs@gmail.com>
Reviewed by Eric Seidel.
https://bugs.webkit.org/show_bug.cgi?id=30895
[Gtk] The accessible hierarchy of tables is significantly incorrect for Atk
This completes the fixing of the Atk table hierarchy which was started
in bug #35418.
* accessibility/gtk/AccessibilityObjectAtk.cpp:
(AccessibilityObject::accessibilityPlatformIncludesObject):
* accessibility/AccessibilityRenderObject.cpp:
(AccessibilityRenderObject::determineAccessibilityRole):
2010-03-06 MORITA Hajime <morrita@google.com>
Reviewed by Darin Adler.
......
......@@ -2735,7 +2735,7 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
#if PLATFORM(GTK)
// Gtk ATs expect all tables, data and layout, to be exposed as tables.
if (node && node->hasTagName(tdTag))
if (node && (node->hasTagName(tdTag) || node->hasTagName(thTag)))
return CellRole;
if (node && node->hasTagName(tableTag))
......
......@@ -41,10 +41,17 @@ AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformI
if (isMenuListPopup() || isMenuListOption())
return IgnoreObject;
// When a list item is made up entirely of children (e.g. paragraphs)
// the list item gets ignored. We need it.
if (isGroup() && parent->isList())
return IncludeObject;
if (isGroup()) {
// When a list item is made up entirely of children (e.g. paragraphs)
// the list item gets ignored. We need it.
if (parent->isList())
return IncludeObject;
// We expect the parent of a table cell to be a table.
AccessibilityObject* child = firstChild();
if (child && child->roleValue() == CellRole)
return IgnoreObject;
}
// Entries and password fields have extraneous children which we want to ignore.
if (parent->isPasswordField() || parent->isTextControl())
......
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