haikuwebkit/LayoutTests/accessibility/tabindex-elements-are-acces...

36 lines
880 B
HTML
Raw Permalink Normal View History

AX: elements with explicit tabindex should expose AXFocused as writable, since mouse clicks can focus it https://bugs.webkit.org/show_bug.cgi?id=121335 Reviewed by Mario Sanchez Prada. Source/WebCore: Re-order logic that determines if a <span> should appear as an accessible element. The change is that if an element canSetFocus() it should always be in the AX tree. Test: accessibility/tabindex-elements-are-accessible.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): (WebCore::AccessibilityRenderObject::determineAccessibilityRole): LayoutTests: * accessibility/tabindex-elements-are-accessible-expected.txt: Added. * accessibility/tabindex-elements-are-accessible.html: Added. New test to ensure that if tabindex is on an element, it is in the AX tree. * platform/mac/accessibility/table-with-row-col-of-headers-expected.txt: * platform/mac/accessibility/table-with-row-col-of-headers.html: Update to reflect that if an ignored <table> has a tabindex, then it should at least be an AXGroup * platform/mac/accessibility/update-children-when-aria-role-changes.html: Update so that the <span> elements being used don't have tabindex, which forces them to be in the AX tree, which changes the output of the test (basically we'd need to query the child of those elements instead). Canonical link: https://commits.webkit.org/141568@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-10-29 16:40:08 +00:00
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<span tabindex="-1" id="item1">test</span>
<span tabindex="0" id="item2">test</span>
<span tabindex="1" id="item3">test</span>
<p tabindex="-1" id="item4">test
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that if tabindex is set on an object, it will be accessible (even if it is usually not)");
if (window.accessibilityController) {
for (var k = 1; k < 5; k++) {
var item = accessibilityController.accessibleElementById("item" + k);
debug("Item " + k + ": Is focusable: " + item.isFocusable);
debug("Item " + k + ": " + item.role);
debug("\n");
}
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>