Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / aria-disabled-propagated-to-children.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div role="tablist" aria-disabled="true" id="tablist">
9         <div role="tab" aria-selected="false" aria-labelledby="foo" id="item1">
10                 <label id="foo">Foo</label>
11         </div>
12
13         <div role="tab" aria-disabled="false" aria-selected="false" aria-labelledby="bar" id="item2">
14                 <label id="bar">Bar</label>
15         </div>
16 </div>
17
18 <p id="description"></p>
19 <div id="console"></div>
20
21 <script>
22
23     description("This tests that aria-disabled will be taken from an ancestor if available");
24
25     if (window.accessibilityController) {
26
27           // Item1 should be enabled=false because its parent is enabled=false.
28           var item1 = accessibilityController.accessibleElementById("item1");
29           shouldBeFalse("item1.isEnabled");
30
31           // Item2 should be enabled=true because it has an explicit aria-disabled=false.
32           var item2 = accessibilityController.accessibleElementById("item2");
33           shouldBeTrue("item2.isEnabled");
34
35           // The tablist should be enabled=false because aria-disabled=true.
36           var tablist = accessibilityController.accessibleElementById("tablist");
37           shouldBeFalse("tablist.isEnabled");
38     }
39
40 </script>
41
42 <script src="../resources/js-test-post.js"></script>
43 </body>
44 </html>