-
Notifications
You must be signed in to change notification settings - Fork 125
/
option-owned-by-listbox.html
55 lines (42 loc) · 1.58 KB
/
option-owned-by-listbox.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html lang="en-US">
<head><title>Elements with role option must be contained in, or owned by, an element with the role listbox or group within a listbox.</title></head>
<body>
<!--
URL: https://www.w3.org/TR/wai-aria-1.2/#option
RULE: "Authors MUST ensure elements with role option are contained in, or owned by, an element with the role listbox or group within a listbox."
-->
<!-- Option elements that should fail -->
<div id="option1" role="option" class="fail">Option 1</div>
<div id="option2" role="option" class="fail">Option 2</div>
<div role="group">
<div id="option3" role="option" class="fail">Option 3</div>
<div id="option4" role="option" class="fail">Option 4</div>
</div>
<!-- Option elements that should pass -->
<div role="listbox" aria-label="foo">
<div id="option5" role="option" class="pass">Option 5</div>
<div id="option6" role="option" class="pass">Option 6</div>
</div>
<div role="listbox" aria-label="foo">
<div role="group">
<div id="option7" role="option" class="pass">Option 7</div>
<div id="option8" role="option" class="pass">Option 8</div>
</div>
</div>
<div role="listbox" aria-owns="id1" aria-label="foo">
</div>
<div id="id1" aria-label="foo">
<div id="option9" role="option" class="pass">Option 9</div>
<div id="option10" role="option" class="pass">Option 10</div>
</div>
<div role="listbox" aria-owns="id2" aria-label="foo">
</div>
<div id="id2">
<div rol="group">
<div id="option11" role="option" class="pass">Option 11</div>
<div id="option12" role="option" class="pass">Option 12</div>
</div>
</div>
</body>
</html>