Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html-aam/aside-in-prefixed-article.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<title>HTML-AAM: aside nested in a prefixed article ancestor</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
</head>
<body>
<script>
promise_test(async () => {
// Construct an HTML <article> with a non-null prefix. The element's
// identity for HTML-AAM purposes is its expanded name (namespace +
// local name); the prefix is incidental.
const article = document.createElementNS(xhtmlNS, "foo:article");
const aside = document.createElement("aside");
aside.textContent = "x";
article.appendChild(aside);
document.body.appendChild(article);
const role = await test_driver.get_computed_role(aside);
// Per HTML-AAM, an <aside> inside an <article> ancestor is generic.
// ARIA WG has accepted "generic", "", and "none" as equivalent for
assert_in_array(role, ["generic", "", "none"]);
}, "el-aside-in-prefixed-article");
</script>
</body>
</html>