Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>ARIA lists</title>
5 <link rel="stylesheet" type="text/css"
6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
8 <script type="application/javascript"
9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
11 <script type="application/javascript"
12 src="../common.js"></script>
13 <script type="application/javascript"
14 src="../role.js"></script>
16 <script type="application/javascript">
17 function doTest()
18 {
19 //////////////////////////////////////////////////////////////////////////
20 // list
22 var accTree =
23 { LIST: [
24 { LISTITEM: [
25 { TEXT_LEAF: [ ] }
26 ] }
27 ] };
29 testAccessibleTree("list", accTree);
31 //////////////////////////////////////////////////////////////////////////
32 // crazy list (mad mix of ARIA and HTML)
34 accTree = { // div@role="list"
35 role: ROLE_LIST,
36 children: [
37 { // li text leaf
38 role: ROLE_TEXT_LEAF,
39 name: "item1",
40 children: [ ]
41 },
42 { // li@role="listitem"
43 role: ROLE_LISTITEM,
44 children: [
45 { // text leaf
46 role: ROLE_TEXT_LEAF,
47 name: "item2",
48 children: [ ]
49 }
50 ]
51 }
52 ]
53 };
55 testAccessibleTree("crazy_list", accTree);
57 SimpleTest.finish();
58 }
60 SimpleTest.waitForExplicitFinish();
61 addA11yLoadEvent(doTest);
62 </script>
63 </head>
64 <body>
66 <a target="_blank"
67 title="Build the context dependent tree"
68 href="https://bugzilla.mozilla.org/show_bug.cgi?id=804461">
69 Mozilla Bug 804461
70 </a>
71 <p id="display"></p>
72 <div id="content" style="display: none"></div>
73 <pre id="test">
74 </pre>
76 <div id="list" role="list">
77 <div role="listitem">item1</div>
78 </div>
80 <div id="crazy_list" role="list">
81 <ul role="presentation">
82 <li>item1</li>
83 <li role="listitem">item2</li>
84 </ul>
85 </div>
86 </body>
87 </html>