haikuwebkit/LayoutTests/accessibility/table-roles-hierarchy.html

92 lines
1.8 KiB
HTML
Raw Permalink Normal View History

[ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles. https://bugs.webkit.org/show_bug.cgi?id=136150 Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-10-10 Reviewed by Chris Fleizach. Source/WebCore: Expose ColumnHeaderRole and RowHeaderRole objects into ATK. Test: accessibility/table-roles-hierarchy.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Platforms based on ATK: added distinction of roles for the <th> elements. * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::determineAccessibilityRole): Platforms based on ATK: the return value is determined in the ancestor. * accessibility/atk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): In addition to CellRole also included ColumnHeaderRole and RowHeaderRole. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): Changing the mapping of ARIA rowheader and columnheader into respective ATK roles. (getInterfaceMaskFromObject): In addition to CellRole also included ColumnHeaderRole and RowHeaderRole. LayoutTests: Minor changes in the roles-exposed test to check the mapping of rowheader and columnheader. As a result of changes in the code test also shows the changes for the <th> element. Changes expectations so that they cover propoer mapping of RowHeaderRole and ColumnHeaderRole. * accessibility/aria-tables-expected.txt: * accessibility/roles-exposed.html: * accessibility/table-roles-hierarchy-expected.txt: Added. * accessibility/table-roles-hierarchy.html: Added. * platform/efl/accessibility/roles-exposed-expected.txt: Added. * platform/efl/accessibility/table-attributes-expected.txt: * platform/efl/accessibility/table-cells-expected.txt: * platform/efl/accessibility/table-detection-expected.txt: * platform/gtk/accessibility/roles-exposed-expected.txt: Added. * platform/gtk/accessibility/table-attributes-expected.txt: * platform/gtk/accessibility/table-cells-expected.txt: * platform/gtk/accessibility/table-sections-expected.txt: * platform/mac/accessibility/aria-tables-expected.txt: Copied from LayoutTests/accessibility/aria-tables-expected.txt. * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Added. Canonical link: https://commits.webkit.org/155444@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-10-10 08:32:58 +00:00
<html>
<head>
Many accessibility js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172372 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt: * accessibility/anonymous-render-block-in-continuation-causes-crash.html: * accessibility/aria-checkbox-sends-notification.html: * accessibility/aria-invalid.html: * accessibility/aria-switch-sends-notification.html: * accessibility/deleting-iframe-destroys-axcache.html: * accessibility/file-upload-button-with-axpress.html: * accessibility/frame-disconnect-textmarker-cache-crash-expected.txt: * accessibility/frame-disconnect-textmarker-cache-crash.html: * accessibility/gtk/aria-listbox-crash.html: * accessibility/heading-title-includes-links-expected.txt: * accessibility/heading-title-includes-links.html: * accessibility/image-map-update-parent-crash-expected.txt: * accessibility/image-map-update-parent-crash.html: * accessibility/insert-children-assert-expected.txt: * accessibility/insert-children-assert.html: * accessibility/ios-simulator/focus-change-notifications.html: * accessibility/label-element-press.html: * accessibility/loading-iframe-updates-axtree.html: * accessibility/mac/aria-expanded-notifications.html: * accessibility/mac/aria-listbox-selectedchildren-change.html: * accessibility/mac/aria-liveregion-on-image.html: * accessibility/mac/aria-liveregions-addedelement.html: * accessibility/mac/aria-liveregions-changedalt.html: * accessibility/mac/aria-liveregions-changedtext.html: * accessibility/mac/aria-liveregions-removedelement.html: * accessibility/mac/combobox-activedescendant-notifications-expected.txt: * accessibility/mac/combobox-activedescendant-notifications.html: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html: * accessibility/mac/html-slider-indicator.html: * accessibility/mac/input-replacevalue-userinfo-expected.txt: * accessibility/mac/input-replacevalue-userinfo.html: * accessibility/mac/ordered-textmarker-crash-expected.txt: * accessibility/mac/ordered-textmarker-crash.html: * accessibility/mac/search-with-frames-expected.txt: * accessibility/mac/search-with-frames.html: * accessibility/mac/selection-boundary-userinfo.html: * accessibility/mac/selection-change-userinfo.html: * accessibility/mac/selection-element-tabbing-to-link.html: * accessibility/mac/selection-value-changes-for-aria-textbox.html: * accessibility/mac/stale-textmarker-crash-expected.txt: * accessibility/mac/stale-textmarker-crash.html: * accessibility/mac/textbox-role-reports-notifications-expected.txt: * accessibility/mac/textbox-role-reports-notifications.html: * accessibility/mac/value-change/value-change-user-info-contenteditable.html: * accessibility/mac/value-change/value-change-user-info-textarea.html: * accessibility/mac/value-change/value-change-user-info-textfield.html: * accessibility/media-element.html: * accessibility/menu-list-sends-change-notification.html: * accessibility/multiselect-list-reports-active-option.html: * accessibility/paragraph-with-linebreaks.html: * accessibility/platform-name.html: * accessibility/radio-button-group-members.html: * accessibility/radio-button-title-label.html: * accessibility/selection-states-expected.txt: * accessibility/selection-states.html: * accessibility/spinbutton-value.html: * accessibility/svg-bounds.html: * accessibility/table-cell-for-column-and-row-crash.html: * accessibility/table-cells-roles.html: * accessibility/table-roles-hierarchy.html: * accessibility/table-with-aria-role.html: * accessibility/textarea-insertion-point-line-number.html: * accessibility/textbox-role-reports-selection.html: * accessibility/title-ui-element-correctness.html: * accessibility/unknown-roles-not-exposed-expected.txt: * accessibility/unknown-roles-not-exposed.html: * accessibility/win/bstr-elements-role.html: * accessibility/win/detached-object-notification-crash.html: * accessibility/win/heading-elements.html: * accessibility/win/img-alt-attribute.html: * accessibility/win/linked-elements.html: * accessibility/win/list-item-role.html: * accessibility/win/list-marker-role.html: * accessibility/win/list-role.html: * accessibility/win/multiple-select-element-role.html: * accessibility/win/option-element-position-and-size.html: * accessibility/win/parent-element.html: * accessibility/win/select-element-role.html: * accessibility/win/selection-and-focus.html: * accessibility/win/single-select-children-changed.html: * accessibility/win/single-select-children.html: * accessibility/win/text-role.html: * platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt: * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/media-element-expected.txt: * platform/mac/accessibility/table-cells-roles-expected.txt: * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Canonical link: https://commits.webkit.org/189300@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 23:37:59 +00:00
<script src="../resources/js-test.js"></script>
[ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles. https://bugs.webkit.org/show_bug.cgi?id=136150 Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-10-10 Reviewed by Chris Fleizach. Source/WebCore: Expose ColumnHeaderRole and RowHeaderRole objects into ATK. Test: accessibility/table-roles-hierarchy.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Platforms based on ATK: added distinction of roles for the <th> elements. * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::determineAccessibilityRole): Platforms based on ATK: the return value is determined in the ancestor. * accessibility/atk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): In addition to CellRole also included ColumnHeaderRole and RowHeaderRole. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): Changing the mapping of ARIA rowheader and columnheader into respective ATK roles. (getInterfaceMaskFromObject): In addition to CellRole also included ColumnHeaderRole and RowHeaderRole. LayoutTests: Minor changes in the roles-exposed test to check the mapping of rowheader and columnheader. As a result of changes in the code test also shows the changes for the <th> element. Changes expectations so that they cover propoer mapping of RowHeaderRole and ColumnHeaderRole. * accessibility/aria-tables-expected.txt: * accessibility/roles-exposed.html: * accessibility/table-roles-hierarchy-expected.txt: Added. * accessibility/table-roles-hierarchy.html: Added. * platform/efl/accessibility/roles-exposed-expected.txt: Added. * platform/efl/accessibility/table-attributes-expected.txt: * platform/efl/accessibility/table-cells-expected.txt: * platform/efl/accessibility/table-detection-expected.txt: * platform/gtk/accessibility/roles-exposed-expected.txt: Added. * platform/gtk/accessibility/table-attributes-expected.txt: * platform/gtk/accessibility/table-cells-expected.txt: * platform/gtk/accessibility/table-sections-expected.txt: * platform/mac/accessibility/aria-tables-expected.txt: Copied from LayoutTests/accessibility/aria-tables-expected.txt. * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Added. Canonical link: https://commits.webkit.org/155444@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-10-10 08:32:58 +00:00
<script>
var tableAXObject;
var indentLevel = 0;
function indent(count) {
var spaces = " ";
return spaces.substr(0, count);
}
function dumpObject(axObject) {
debug(indent(indentLevel) + "role: " + axObject.role);
if (axObject.subrole && axObject.subrole != 'AXSubrole: ') debug(indent(indentLevel) + "subrole: " + axObject.subrole);
}
function dumpChildren(axObject) {
var count = axObject.childrenCount
if (!count)
return;
indentLevel += 4;
for (var ndx = 0; ndx < count; ndx++) {
var childAXObject = axObject.childAtIndex(ndx);
dumpObject(childAXObject);
if (childAXObject.childrenCount) {
// don't bother dumping static text children
if (childAXObject.role != "AXRole: AXStaticText")
dumpChildren(childAXObject);
}
}
indentLevel -= 4;
}
function dumpTableAX()
{
if (!window.accessibilityController)
return;
var table = accessibilityController.accessibleElementById("table1");
dumpObject(table);
dumpChildren(table);
}
</script>
</head>
<body onload="dumpTableAX()">
<table id="table1">
<thead>
<tr>
<th>No</th>
<th>Country</th>
<th>Capital</th>
</tr>
</thead>
<tbody>
<tr>
<th>1.</th>
<td>Poland</td>
<td>Warsaw</td>
</tr>
<tr>
<th>2.</th>
<td>Russia</td>
<td>Moscow</td>
</tr>
<tr>
<th>3.</th>
<td>Ukraine</td>
<td>Kiev</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>All</th>
<td>3 countries</td>
<td>3 capitals</td>
</tr>
</tfoot>
</table>
<br>
<br>
<br>
<p>This shows the hierarchy of table roles.</p>
<div id=console></div>
</body>
</html>