blob: 533d6e0f17dfa1d8a5357dc379c2745f52be063b [file] [edit]
<!DOCTYPE html><!-- webkit-test-runner [ IsAccessibilityIsolatedTreeEnabled=true ] -->
<html>
<body>
<script src="../../../resources/js-test.js"></script>
<script src="../../../resources/accessibility-helper.js"></script>
<custom-element id="custom-location"></custom-element>
<custom-element id="custom-page" aria-current="page"></custom-element>
<script>
customElements.define('custom-element', class CustomElement extends HTMLElement {
constructor()
{
super();
const internals = this.attachInternals();
internals.ariaCurrent = 'location';
}
});
description("This tests that aria fallback roles work correctly.");
if (!window.accessibilityController)
debug('This test requires accessibilityController');
else {
shouldBeEqualToString('accessibilityController.accessibleElementById("custom-location").currentStateValue', 'location');
shouldBeEqualToString('accessibilityController.accessibleElementById("custom-page").currentStateValue', 'page');
}
</script>
</body>
</html>