AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Dec 2014 02:02:36 +0000 (02:02 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Dec 2014 02:02:36 +0000 (02:02 +0000)
commited91b8aef0d6882cbfbbcf73b878b367f88d01b7
treea9b032f3ee5a316269d10a0f1d49d8a52faa300b
parentddfa8a99802f0105c9b594125b10116ab2c559d0
AX: [ATK] Table captions and table rows are missing from the accessible hierarchy
https://bugs.webkit.org/show_bug.cgi?id=139005

Reviewed by Chris Fleizach.

Source/WebCore:

Expose table captions and rows via ATK. Accomplishing the former is done
by role mapping and inclusion of the object as a child of the table for
ATK. Accomplishing the latter was mostly a matter of deleting all the ATK
platform code that had been forcing rows to be ignored. Because captions
are not being exposed on the Mac, they are now explicitly being ignored
for that platform.

Tests: accessibility/aria-table-hierarchy.html
       accessibility/table-hierarchy.html

* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Added CaptionRole.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren): Include non-ignored captions as table children.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetNChildren): Removed special handling for tables.
(webkitAccessibleRefChild): Removed special handling for tables.
(webkitAccessibleGetIndexInParent): Removed special handling for table cells.
(atkRole): Corrected broken mapping for RowRole.
(getNChildrenForTable): Deleted.
(getChildForTable): Deleted.
(getIndexInParentForCellInRow): Deleted.
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore captions as table children.

Tools:

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
Add mapping for ATK_ROLE_CAPTION to roleToString

LayoutTests:

* accessibility/aria-table-hierarchy.html: Added.
* accessibility/roles-exposed.html: Removed comment pointing to this bug.
* accessibility/table-hierarchy.html: Added.
* platform/efl/accessibility/aria-table-hierarchy-expected.txt: Added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated to reflect new behavior.
* platform/efl/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
* platform/efl/accessibility/table-hierarchy-expected.txt: Added.
* platform/efl/accessibility/table-roles-hierarchy-expected.txt: Added.
* platform/efl/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/aria-table-hierarchy-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/aria-table-hierarchy.html: Removed (made into a shared test).
* platform/gtk/accessibility/caret-offsets-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/caret-offsets.html: Modified to handle inclusion of rows.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-hierarchy-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/table-hierarchy.html: Removed (made into a shared test).
* platform/gtk/accessibility/table-roles-hierarchy-expected.txt: Added.
* platform/gtk/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.
* platform/gtk/accessibility/text-for-range-table-cells.html: Updated to reflect new behavior.
* platform/mac/accessibility/aria-table-hierarchy-expected.txt: Added.
* platform/mac/accessibility/table-hierarchy-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/aria-table-hierarchy.html [new file with mode: 0644]
LayoutTests/accessibility/roles-exposed.html
LayoutTests/accessibility/table-hierarchy.html [new file with mode: 0644]
LayoutTests/platform/efl/accessibility/aria-table-hierarchy-expected.txt [new file with mode: 0644]
LayoutTests/platform/efl/accessibility/roles-exposed-expected.txt
LayoutTests/platform/efl/accessibility/table-detection-expected.txt
LayoutTests/platform/efl/accessibility/table-hierarchy-expected.txt [new file with mode: 0644]
LayoutTests/platform/efl/accessibility/table-roles-hierarchy-expected.txt [new file with mode: 0644]
LayoutTests/platform/efl/accessibility/table-with-rules-expected.txt
LayoutTests/platform/gtk/accessibility/aria-table-hierarchy-expected.txt
LayoutTests/platform/gtk/accessibility/aria-table-hierarchy.html [deleted file]
LayoutTests/platform/gtk/accessibility/caret-offsets-expected.txt
LayoutTests/platform/gtk/accessibility/caret-offsets.html
LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt
LayoutTests/platform/gtk/accessibility/table-detection-expected.txt
LayoutTests/platform/gtk/accessibility/table-hierarchy-expected.txt
LayoutTests/platform/gtk/accessibility/table-hierarchy.html [deleted file]
LayoutTests/platform/gtk/accessibility/table-roles-hierarchy-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/table-with-rules-expected.txt
LayoutTests/platform/gtk/accessibility/text-for-range-table-cells.html
LayoutTests/platform/mac/accessibility/aria-table-hierarchy-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/table-hierarchy-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp