haikuwebkit/LayoutTests/accessibility/aria-labelledby-overrides-a...

38 lines
1.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
<script src="../resources/accessibility-helper.js"></script>
<title>aria-labelledby Overrides aria-labeledby</title>
</head>
<body>
<div id="test">
<a aria-labeledby="x1 x2" aria-labelledby="y1 y2" href="#" id="link">X</a>
<!-- Incorrectly spelled aria-labelledby attribute labels. -->
<span id="x1">I</span>
<span id="x2">J</span>
<!-- Correctly spelled aria-labelledby attribute labels. -->
<span id="y1">Y</span>
<span id="y2">Z</span>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that aria-labelledby overrides aria-labeledby correctly.");
if (window.accessibilityController) {
var axLink = accessibilityController.accessibleElementById("link");
shouldBeEqualToString("platformValueForW3CName(axLink)", "Y Z");
// Hide superfluous text.
document.getElementById("test").style.display = "none";
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>