[Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
[WebKit-https.git] / LayoutTests / accessibility / aria-hidden-negates-no-visibility.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 <h1 hidden id="heading1_1">heading1.1</h1>
9 <h1 aria-hidden="true" id="heading1_2">heading1.2</h1>
10 <h1 hidden aria-hidden="true" id="heading1_3">heading1.3</h1>
11
12 <h1 hidden aria-hidden="false" id="heading2">heading2</h1>
13 <h1 style="display:none;" aria-hidden="false" id="heading3">heading3</h1>
14 <h1 style="visibility:hidden;" aria-hidden="false" id="heading4">heading4</h1>
15
16 <div hidden aria-hidden="false" id="hiddenDiv">HiddenText1</div>
17 <input type="text" aria-labelledby="hiddenDiv" id="textFieldWithHiddenLabeller">
18
19 <div aria-hidden="false">
20 <video id="video">
21 Hidden content
22 </video>
23 </div>
24
25 <p id="description"></p>
26 <div id="console"></div>
27
28 <script>
29
30     description("This tests ensures that aria-hidden=false will allow a node to be in the AX hierarchy even if it's not rendered or visible");
31
32     if (window.accessibilityController) {
33
34         // First groups of headings are actually hidde.n
35         var heading1_1 = accessibilityController.accessibleElementById("heading1_1");
36         shouldBeTrue("!heading1_1 || !heading1_1.isValid");
37
38         var heading1_2 = accessibilityController.accessibleElementById("heading1_2");
39         shouldBeTrue("!heading1_2 || !heading1_3.isValid");
40
41         var heading1_3 = accessibilityController.accessibleElementById("heading1_3");
42         shouldBeTrue("!heading1_3 || !heading1_3.isValid");
43
44         // These headings should be in AX tree despite being hidden.
45         var heading2 = accessibilityController.accessibleElementById("heading2");
46         shouldBe("heading2.role", "'AXRole: AXHeading'");
47
48         // Check that the order of these elements is correct based on DOM order.
49         var parent = heading2.parentElement();
50         shouldBeTrue("parent.childAtIndex(0).isEqual(heading2)");
51
52         var heading3 = accessibilityController.accessibleElementById("heading3");
53         shouldBe("heading3.role", "'AXRole: AXHeading'");
54         shouldBeTrue("parent.childAtIndex(1).isEqual(heading3)");
55
56         var heading4 = accessibilityController.accessibleElementById("heading4");
57         shouldBe("heading4.role", "'AXRole: AXHeading'");
58         shouldBeTrue("parent.childAtIndex(2).isEqual(heading4)");
59
60         // The aria-labelledby attribute should work even though hidden.
61         var textField = accessibilityController.accessibleElementById("textFieldWithHiddenLabeller");
62         debug("Textfield Title: " + textField.title);
63         
64         // aria-hidden="false" need to be on each parent, including rendered parents.
65         var video = accessibilityController.accessibleElementById("video");
66         shouldBe("video.childrenCount", "0");
67     }
68
69 </script>
70
71 <script src="../resources/js-test-post.js"></script>
72 </body>
73 </html>