AX: accessibility data table heuristics fail on this jQuery table
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2014 16:28:24 +0000 (16:28 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2014 16:28:24 +0000 (16:28 +0000)
commit82a0de09b5604fe63067197cbe5d1e950c0ef8d0
tree60060e2f153780995457fc3f2eae31cbe46d668c
parent57979a5efc27217a6b017fa05f654f33f472a01b
AX: accessibility data table heuristics fail on this jQuery table
https://bugs.webkit.org/show_bug.cgi?id=129369

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Updated accessibility/table-detection.html

If a table uses display style of table-row-group, the RenderTable gets disassociated from the HTMLTableElement.
We can find that element in a different way by asking for the parent of the first table section.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::activeDescendant):
    This method was accessing an object's element unsafely and this table change exposed the issue.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::tableElement):
(WebCore::AccessibilityTable::isDataTable):
* accessibility/AccessibilityTable.h:

LayoutTests:

* accessibility/table-detection.html:
* platform/mac/accessibility/table-detection-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/table-detection.html
LayoutTests/platform/mac/accessibility/table-detection-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/AccessibilityTable.h