[Web GPU] GPURenderPassEncoder updates: setBlendColor, setViewport, setScissorRect
[WebKit-https.git] / LayoutTests / accessibility / aria-labelledby-with-descendants.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 <script src="../resources/accessibility-helper.js"></script>
6 </head>
7 <body id="body">
8
9 <div id="content">
10
11 <div class="ex" data-label="hello link use world test1 test2 test3" aria-labelledby="a1 b1" id="test1" role="group">group text</div>
12 <div id="a1">hello <a href="#">link</a> <div role="group">skip</div> <div role="group" aria-label="use">skip</div> world</div>
13 <!-- paragraph role is ambiguous so okay to leave next example as it -->
14 <div id="b1"><button>test1</button><p tabindex=0>test2 <span aria-hidden="true">hidden</span> test3</p></div>
15
16 <input type="checkbox" aria-labelledby="reverselabelfor" id="test2" class="ex" data-label="foo bar" data-note="labelled by label element">
17 <label id="reverselabelfor">foo <span role="text" aria-label="bar">skip</span></label>
18 <br>
19
20 <input type="checkbox" aria-labelledby="reverselabelforwithdiv" id="test3" class="ex" data-label="foo bar" data-note="labelled by div element">
21 <div id="reverselabelforwithdiv">foo <span role="text" aria-label="bar">skip</span></div>
22 <br>
23
24 <!-- would be "bar" natively, but label explicitly overridden to "foo" by labelledby -->
25 <div id="overridesnativelabel">foo</div><label for="nativelabeloverridden">bar</label>
26 <input class="ex" data-label="foo" id="test4" type="text" aria-labelledby="overridesnativelabel" data-note="overrides native label">
27
28 <!-- self-referencing labelledby in combination with external reference -->
29 <div id="productname1"><nav role="navigation"><!-- nav does not get nameFrom:contents -->product name</nav></div>
30 <button class="ex" data-label="Delete" aria-label="Delete" aria-labelledby="test5 productname1" id="test5" data-note="self-referencial labelledby includes nav">x</button>
31
32 <!-- self-referencing labelledby in combination with external reference -->
33 <div id="productname2"><nav role="heading"><!-- nav does not get nameFrom:contents, but heading does. -->product name</nav></div>
34 <button class="ex" data-label="Delete product name" aria-label="Delete" aria-labelledby="test6 productname2" id="test6" data-note="self-referencial labelledby includes heading">x</button>
35
36 <div class="ex" data-label="foo bar baz bop bap boom" aria-labelledby="a3 b3" id="test7" role="group" data-note="includes form elements">foo</div>
37 <button id="a3"> foo <img src="#" alt="bar"> baz</button>
38 <div id="b3">bop <input value="bap"> <input type="range" aria-valuetext="boom"></div>
39
40
41 </div>
42
43 <p id="description"></p>
44 <div id="console"></div>
45
46 <script>
47
48     description("This tests that if aria-labelledby is pointing to nodes with descendants, it returns all text.");
49
50     if (window.accessibilityController) {
51           for (var k = 1; k < 8; k++) {
52               var test = accessibilityController.accessibleElementById("test" + k);
53               debug("test " + k + ": aria-labelledby description: " + platformValueForW3CName(test));
54               debug("test " + k + ": expected description: " + document.getElementById("test" + k).getAttribute("data-label") + "\n");
55           }
56           document.getElementById("content").style.visibility = "hidden";
57     }
58
59 </script>
60
61 <script src="../resources/js-test-post.js"></script>
62 </body>
63 </html>