Skip to content

Commit d51a414

Browse files
authored
list element role tests
related to w3c/aria#2212
1 parent 6df6ad4 commit d51a414

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

html-aam/roles-generic.tentative.html

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,44 @@
1010
<script src="/wai-aria/scripts/aria-utils.js"></script>
1111
</head>
1212
<body>
13+
<p>Tests contextual computedrole mappings for the <code>LI</code> element defined in <a href="https://w3c.github.io/html-aam/">HTML-AAM</a>,
14+
where the returned computed role is expected to change based on whether the <code>LI</code> element is an accessibility child of a list element, or not.<p>
1315

16+
1417
<li data-testname="el-li-orphaned" class="ex-generic">x</li><!-- todo: should orphaned roles be tested in a new ./roles-orphaned.html file? -->
1518

19+
<ul role=none>
20+
<li data-testname="el-li-orphaned-within-list-role-none" class="ex-generic">x</li>
21+
</ul>
22+
23+
<ul>
24+
<div>
25+
<li data-testname="el-li-within-generic-within-list-parent" class="ex" data-expectedrole="listitem">x</li>
26+
</div>
27+
</ul>
28+
29+
30+
<ul aria-owns=t>
31+
</ul>
32+
<li data-testname="el-li-orphaned-in-dom-but-owned-by-list-element" id=t class="ex" data-expectedrole="listitem">x</li>
33+
34+
35+
<div role=list>
36+
<li data-testname="el-li-within-explicit-role-list-parent" id=t class="ex" data-expectedrole="listitem">x</li>
37+
</div>
38+
1639
<script>
40+
AriaUtils.verifyRolesBySelector(".ex");
1741
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
1842
</script>
1943

2044
</body>
21-
</html>
45+
</html>
46+
47+
48+
49+
50+
51+
52+
53+

0 commit comments

Comments
 (0)