Title: [186974] trunk
- Revision
- 186974
- Author
- [email protected]
- Date
- 2015-07-17 16:32:30 -0700 (Fri, 17 Jul 2015)
Log Message
AX: iframe within table cell is inaccessible to VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=147001
<rdar://problem/21106945>
Patch by Nan Wang <[email protected]> on 2015-07-17
Reviewed by Chris Fleizach.
Source/WebCore:
When a table cell is created before its parent table determines if it should be ignored or not,
the table cell may cache the wrong role. Fix that by allowing each table cell to update its role
after the table makes this determination.
Test: accessibility/iframe-within-cell.html
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addChildrenFromSection):
LayoutTests:
* accessibility/iframe-within-cell-expected.txt: Added.
* accessibility/iframe-within-cell.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (186973 => 186974)
--- trunk/LayoutTests/ChangeLog 2015-07-17 23:32:11 UTC (rev 186973)
+++ trunk/LayoutTests/ChangeLog 2015-07-17 23:32:30 UTC (rev 186974)
@@ -1,3 +1,14 @@
+2015-07-17 Nan Wang <[email protected]>
+
+ AX: iframe within table cell is inaccessible to VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=147001
+ <rdar://problem/21106945>
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/iframe-within-cell-expected.txt: Added.
+ * accessibility/iframe-within-cell.html: Added.
+
2015-07-17 Myles C. Maxfield <[email protected]>
style.fontFamily accessor crashes on unstyled node created from DOMParser().parseFromString()
Added: trunk/LayoutTests/accessibility/iframe-within-cell-expected.txt (0 => 186974)
--- trunk/LayoutTests/accessibility/iframe-within-cell-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/iframe-within-cell-expected.txt 2015-07-17 23:32:30 UTC (rev 186974)
@@ -0,0 +1,11 @@
+This tests iframe within a cell is accessible.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Role for iframe cell is: AXRole: AXCell .
+
+Cell A Cell C
Added: trunk/LayoutTests/accessibility/iframe-within-cell.html (0 => 186974)
--- trunk/LayoutTests/accessibility/iframe-within-cell.html (rev 0)
+++ trunk/LayoutTests/accessibility/iframe-within-cell.html 2015-07-17 23:32:30 UTC (rev 186974)
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script>
+
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function runTest()
+{
+ document.getElementById("frame_cell").focus()
+ if (window.accessibilityController) {
+ document.body.focus();
+ var frameElement = accessibilityController.accessibleElementById("frame_cell");
+ debug("Role for iframe cell is: " + frameElement.role + " .\n");
+ }
+}
+
+</script>
+</head>
+
+<body _onload_="runTest()">
+<table cellpadding=0 cellspacing=0 border=2>
+<tr>
+<td> Cell A </td>
+<td id="frame_cell" description="Cell B"><iframe src="" width="100%"></iframe></td>
+<td> Cell C </td>
+</tr>
+</table>
+
+<script>
+description("This tests iframe within a cell is accessible.");
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (186973 => 186974)
--- trunk/Source/WebCore/ChangeLog 2015-07-17 23:32:11 UTC (rev 186973)
+++ trunk/Source/WebCore/ChangeLog 2015-07-17 23:32:30 UTC (rev 186974)
@@ -1,3 +1,21 @@
+2015-07-17 Nan Wang <[email protected]>
+
+ AX: iframe within table cell is inaccessible to VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=147001
+ <rdar://problem/21106945>
+
+ Reviewed by Chris Fleizach.
+
+ When a table cell is created before its parent table determines if it should be ignored or not,
+ the table cell may cache the wrong role. Fix that by allowing each table cell to update its role
+ after the table makes this determination.
+
+ Test: accessibility/iframe-within-cell.html
+
+ * accessibility/AccessibilityTable.cpp:
+ (WebCore::AccessibilityTable::addChildren):
+ (WebCore::AccessibilityTable::addChildrenFromSection):
+
2015-07-17 Myles C. Maxfield <[email protected]>
style.fontFamily accessor crashes on unstyled node created from DOMParser().parseFromString()
Modified: trunk/Source/WebCore/accessibility/AccessibilityTable.cpp (186973 => 186974)
--- trunk/Source/WebCore/accessibility/AccessibilityTable.cpp 2015-07-17 23:32:11 UTC (rev 186973)
+++ trunk/Source/WebCore/accessibility/AccessibilityTable.cpp 2015-07-17 23:32:30 UTC (rev 186974)
@@ -409,6 +409,16 @@
AccessibilityObject* headerContainerObject = headerContainer();
if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored())
m_children.append(headerContainerObject);
+
+ // Sometimes the cell gets the wrong role initially because it is created before the parent
+ // determines whether it is an accessibility table. Iterate all the cells and allow them to
+ // update their roles now that the table knows its status.
+ // see bug: https://bugs.webkit.org/show_bug.cgi?id=147001
+ for (const auto& row : m_rows) {
+ for (const auto& cell : row->children())
+ cell->updateAccessibilityRole();
+ }
+
}
void AccessibilityTable::addChildrenFromSection(RenderTableSection* tableSection, unsigned& maxColumnCount)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes