Skip to content
Permalink
Browse files
2010-03-08 Joanmarie Diggs <joanmarie.diggs@gmail.com>
        Reviewed by Xan Lopez.

        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:
        * platform/gtk/accessibility/table-hierarchy-expected.txt:
2010-03-08  Joanmarie Diggs  <joanmarie.diggs@gmail.com>

        Reviewed by Xan Lopez.

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

        Gives platforms the ability to exclude parts of an AccessibilityTable
        from the accessible hierarchy.

        * accessibility/gtk/AccessibilityObjectAtk.cpp:
        (AccessibilityObject::accessibilityPlatformIncludesObject):
        * accessibility/AccessibilityRenderObject.cpp:
        (AccessibilityRenderObject::determineAccessibilityRole):
        * accessibility/AccessibilityTable.cpp:
        (AccessibilityTable::addChildren):
        * accessibility/AccessibilityTableColumn.h:
        (accessibilityIsIgnored):
        * accessibility/AccessibilityTableHeaderContainer.h:
        (accessibilityIsIgnored):
        * accessibility/AccessibilityTableRow.cpp:
        (accessibilityIsIgnored):

Canonical link: https://commits.webkit.org/46977@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Mar 8, 2010
1 parent 3add7d5 commit d446cd653a098539e02fbfcd129dd44c45d5d9f7
Showing 10 changed files with 90 additions and 3 deletions.
@@ -1,3 +1,13 @@
2010-03-08 Joanmarie Diggs <joanmarie.diggs@gmail.com>

Reviewed by Xan Lopez.

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:
* platform/gtk/accessibility/table-hierarchy-expected.txt:

2010-03-08 Adam Barth <abarth@webkit.org>

Reviewed by Nate Chapin.
@@ -3,6 +3,15 @@ Odd Even
1 2
3 4
hello world
Odd Even
1

2

3

4

This tests the Atk table hierarhy.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -11,6 +20,7 @@ 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 table4.role is 'table'
PASS children is 2
PASS table1.childAtIndex(i).role is 'table cell'
PASS table1.childAtIndex(i).role is 'table cell'
@@ -24,6 +34,13 @@ 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 children is 6
PASS table4.childAtIndex(i).role is 'table cell'
PASS table4.childAtIndex(i).role is 'table cell'
PASS table4.childAtIndex(i).role is 'table cell'
PASS table4.childAtIndex(i).role is 'table cell'
PASS table4.childAtIndex(i).role is 'table cell'
PASS table4.childAtIndex(i).role is 'table cell'
PASS successfullyParsed is true

TEST COMPLETE
@@ -21,6 +21,11 @@
<tr><td>hello</td><td>world</td></tr>
</tbody>
</table>
<table border=1>
<tr><th>Odd</th><th>Even</th></tr>
<tr><td><p>1</p></td><td><p>2</p></td></tr>
<tr><td><p>3</p></td><td><p>4</p></td></tr>
</table>
<p id="description"></p>
<div id="console"></div>
<script>
@@ -36,6 +41,8 @@
shouldBe("table2.role", "'table'");
var table3 = webArea.childAtIndex(2);
shouldBe("table3.role", "'table'");
var table4 = webArea.childAtIndex(3);
shouldBe("table4.role", "'table'");

var children = table1.childrenCount;
shouldBe("children", "2");
@@ -52,6 +59,11 @@
for (i = 0; i < children; ++i) {
shouldBe("table3.childAtIndex(i).role", "'table cell'");
}
children = table4.childrenCount;
shouldBe("children", "6");
for (i = 0; i < children; ++i) {
shouldBe("table4.childAtIndex(i).role", "'table cell'");
}
}
successfullyParsed = true;
</script>
@@ -1,3 +1,26 @@
2010-03-08 Joanmarie Diggs <joanmarie.diggs@gmail.com>

Reviewed by Xan Lopez.

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

Gives platforms the ability to exclude parts of an AccessibilityTable
from the accessible hierarchy.

* accessibility/gtk/AccessibilityObjectAtk.cpp:
(AccessibilityObject::accessibilityPlatformIncludesObject):
* accessibility/AccessibilityRenderObject.cpp:
(AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTable.cpp:
(AccessibilityTable::addChildren):
* accessibility/AccessibilityTableColumn.h:
(accessibilityIsIgnored):
* accessibility/AccessibilityTableHeaderContainer.h:
(accessibilityIsIgnored):
* accessibility/AccessibilityTableRow.cpp:
(accessibilityIsIgnored):

2010-03-08 Jian Li <jianli@chromium.org>

No review. Fix build break on Tiger intel release.
@@ -2738,6 +2738,9 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
if (node && (node->hasTagName(tdTag) || node->hasTagName(thTag)))
return CellRole;

if (node && node->hasTagName(trTag))
return RowRole;

if (node && node->hasTagName(tableTag))
return TableRole;
#endif
@@ -250,7 +250,12 @@ void AccessibilityTable::addChildren()

row->setRowIndex((int)m_rows.size());
m_rows.append(row);
m_children.append(row);
if (!row->accessibilityIsIgnored())
m_children.append(row);
#if PLATFORM(GTK)
else
m_children.append(row->children());
#endif
appendedRows.add(row);
}
}
@@ -265,11 +270,12 @@ void AccessibilityTable::addChildren()
column->setColumnIndex((int)i);
column->setParentTable(this);
m_columns.append(column);
m_children.append(column);
if (!column->accessibilityIsIgnored())
m_children.append(column);
}

AccessibilityObject* headerContainerObject = headerContainer();
if (headerContainerObject)
if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored())
m_children.append(headerContainerObject);
}

@@ -50,7 +50,11 @@ class AccessibilityTableColumn : public AccessibilityObject {
AccessibilityObject* headerObject();

virtual AccessibilityRole roleValue() const { return ColumnRole; }
#if PLATFORM(GTK)
virtual bool accessibilityIsIgnored() const { return true; }
#else
virtual bool accessibilityIsIgnored() const { return false; }
#endif
virtual bool isTableColumn() const { return true; }

void setColumnIndex(int columnIndex) { m_columnIndex = columnIndex; }
@@ -48,7 +48,11 @@ class AccessibilityTableHeaderContainer : public AccessibilityObject {
void setParentTable(AccessibilityTable* table) { m_parentTable = table; }
virtual AccessibilityObject* parentObject() const { return m_parentTable; }

#if PLATFORM(GTK)
virtual bool accessibilityIsIgnored() const { return true; }
#else
virtual bool accessibilityIsIgnored() const { return false; }
#endif

virtual const AccessibilityChildrenVector& children();
virtual void addChildren();
@@ -76,7 +76,11 @@ bool AccessibilityTableRow::isTableRow() const

bool AccessibilityTableRow::accessibilityIsIgnored() const
{
#if PLATFORM(GTK)
if (true)
#else
if (!isTableRow())
#endif
return AccessibilityRenderObject::accessibilityIsIgnored();

return false;
@@ -63,6 +63,10 @@ AccessibilityObjectPlatformInclusion AccessibilityObject::accessibilityPlatformI
if (role == CellRole || role == TableRole)
return IncludeObject;

// We at some point might have a need to expose a table row; but it's not standard Gtk+.
if (role == RowRole)
return IgnoreObject;

// The object containing the text should implement AtkText itself.
if (role == StaticTextRole)
return IgnoreObject;

0 comments on commit d446cd6

Please sign in to comment.