Skip to content
Permalink
Browse files
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):

Canonical link: https://commits.webkit.org/46920@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Mar 6, 2010
1 parent f08fd42 commit a811f4e63204aeaec5795fdaf65c8efbc035e412
Showing 6 changed files with 127 additions and 5 deletions.
@@ -1,3 +1,13 @@
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.
@@ -0,0 +1,30 @@
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

@@ -0,0 +1,60 @@
<!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>
@@ -1,3 +1,18 @@
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())

0 comments on commit a811f4e

Please sign in to comment.