Update device orientation & motion permission native SPI as per latest proposal
[WebKit-https.git] / LayoutTests / accessibility / w3c-svg-name-calculation.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 <div id="content">
9 <svg>
10   <circle id="test1" aria-labelledby="t1" aria-label="bob" cx="50" cy="100" r="15" data-expected="name: end">
11     <title>abc</title>
12   </circle>
13   <text id="t1" x="40" y="90">end</text>
14 </svg>
15 <svg>
16   <circle id="test2" aria-labelledby="t2" aria-label="bob" cx="50" cy="100" r="15" data-expected="name: end"/>
17   <text id="t2" x="40" y="90">end</text>
18 </svg>
19 <svg>
20   <circle id="test3" aria-labelledby="t3" cx="50" cy="100" r="15" data-expected="name: end">
21     <title>abc</title>
22   </circle>
23   <text id="t3" x="40" y="90">end</text>
24 </svg>
25 <svg>
26   <circle id="test4" aria-labelledby="t4" cx="50" cy="100" r="15" data-expected="name: end"/>
27   <text id="t4" x="40" y="90">end</text>
28 </svg>
29 <svg>
30   <circle id="test5" aria-label="hello" cx="10" cy="10" r="5" data-expected="name: hello">
31     <title>abc</title>
32   </circle>
33 </svg>
34 <svg>
35   <circle id="test6" aria-label="hello" cx="10" cy="10" r="5" data-expected="name: hello"/>
36 </svg>
37 <svg>
38   <circle id="test7" cx="10" cy="100" r="5" data-expected="name: abc">
39     <title>abc</title>
40   </circle>
41 </svg>
42 <svg>
43   <circle id="test8" cx="10" cy="100" r="5" data-expected="name: hi">
44     <title lang="es">hola</title>
45     <title lang="en">hi</title>
46     <title lang="de">Hallo</title>
47   </circle>
48 </svg>
49 <svg>
50   <circle id="test9" cx="10" cy="100" r="5" data-expected="name: hi">
51     <title lang="en">hi</title>
52     <title lang="es">hola</title>
53     <title lang="de">Hallo</title>
54   </circle>
55 </svg>
56 <svg>
57   <circle id="test10" cx="10" cy="100" r="5" data-expected="name: hi">
58     <title lang="es">hola</title>
59     <title lang="de">Hallo</title>
60     <title lang="en">hi</title>
61   </circle>
62 </svg>
63 <svg>
64   <g lang="es">
65     <circle id="test11" cx="10" cy="100" r="5" data-expected="name: hola">
66       <title lang="es">hola</title>
67       <title lang="en">hi</title>
68        <title lang="de">Hallo</title>
69     </circle>
70   </g>
71 </svg>
72 <svg>
73   <g lang="es" aria-label="123">
74     <circle id="test12" cx="10" cy="100" r="5" data-expected="name: hola">
75       <title lang="en">hi</title>
76       <title lang="es">hola</title>
77       <title lang="de">Hallo</title>
78     </circle>
79   </g>
80 </svg>
81 <svg>
82   <g lang="es" aria-label="123">
83     <circle id="test13" cx="10" cy="100" r="5" data-expected="name: hola">
84       <title lang="es">hola</title>
85       <title lang="de">Hallo</title>
86       <title lang="en">hi</title>
87     </circle>
88   </g>
89 </svg>
90 <svg>
91   <circle id="test14" aria-labelledby="" aria-label="bob" cx="50" cy="100" r="15" data-expected="name: bob">
92     <title>abc</title>
93   </circle>
94 </svg>
95 <svg>
96   <circle id="test15" aria-labelledby="" aria-label="bob" cx="50" cy="100" r="15" data-expected="name: bob"/>
97 </svg>
98 <svg>
99   <circle id="test16" aria-labelledby="" cx="50" cy="100" r="15" data-expected="name: abc">
100     <title>abc</title>
101   </circle>
102 </svg>
103 <svg>
104   <circle id="test17" aria-labelledby="" cx="50" cy="100" r="15" tabindex="0" data-expected="name: (empty)"/>
105 </svg>
106 <svg>
107   <circle id="test18" aria-labelledby="" cx="50" cy="100" r="15" data-expected="name: waz up">
108     <title lang="es">hola</title>
109     <title lang="fr">bonjour</title>
110     <title lang="en">waz up</title>
111     <title lang="de">Hallo</title>
112   </circle>
113 </svg>
114 <svg>
115   <g lang="de" aria-label="123">
116     <circle id="test19" aria-labelledby="" cx="50" cy="100" r="15" data-expected="name: Hallo">
117       <title lang="es">hola</title>
118       <title lang="fr">bonjour</title>
119       <title lang="en">waz up</title>
120       <title lang="de">Hallo</title>
121     </circle>
122   </g>
123 </svg>
124 <svg>
125   <circle id="test20" aria-labelledby="20a 20b" cx="50" cy="100" r="15" data-expected="name: the end"/>
126   <text id="20a" x="40" y="90">the</text>
127   <text id="20b" x="140" y="90">end</text>
128 </svg>
129 <svg>
130   <circle id="test21" aria-labelledby="21a 21b" cx="50" cy="100" r="15" data-expected="name: big end"/>
131   <text id="21a" x="40" y="90" aria-label="big">the</text>
132   <text id="21b" x="140" y="90">end</text>
133 </svg>
134 <svg>
135   <circle id="test22" aria-labelledby="22a 22b" cx="50" cy="100" r="15" data-expected="name: big end"/>
136   <text id="22a" x="40" y="90" aria-label="big">the</text>
137   <text id="22b" x="140" y="90" aria-labelledby="3c">end</text>
138   <text id="22c" x="180" y="90">finish</text>
139 </svg>
140 <svg>
141   <circle id="test23" aria-labelledby="23a 23b" cx="50" cy="100" r="15" data-expected="name: end"/>
142   <text id="23b" x="40" y="90">end</text>
143 </svg>
144 <svg>
145   <text id="test24" x="40" y="90" data-expected="name: end">end</text>
146 </svg>
147 <svg>
148   <a id="test25" aria-label="booth" href="../index.html" xlink:title="table" data-expected="name: booth"></a>
149 </svg>
150 <svg>
151   <a id="test26" href="../index.html" xlink:title="table" data-expected="name: table"></a>
152 </svg>
153 <svg>
154   <a id="test27" href="../index.html" data-expected="name: counter">
155     <title>counter</title>
156   </a>
157 </svg>
158 <svg>
159   <a id="test28" href="../index.html" xlink:title="table" data-expected="name: counter">
160     <title>counter</title>
161   </a>
162 </svg>
163 <svg>
164   <a id="test29" href="../index.html" xlink:title="table" data-expected="name: counter">
165     <title lang="es">barra</title>
166     <title lang="en">counter</title>
167     <title lang="fr">guichet</title>
168   </a>
169 </svg>
170 <svg>
171   <defs>
172     <path id="r30" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
173       <title>rock</title>
174     </path>
175   </defs>
176   <use id="test30" transform="translate(30 345)" xlink:href="#r30" aria-labelledby="b1" data-expected="name: boulder"/>
177   <text id="b1" x="35" y="90">boulder</text>
178 </svg>
179 <svg>
180   <defs>
181     <path id="r31" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
182       <title>rock</title>
183     </path>
184   </defs>
185   <use id="test31" transform="translate(30 345)" xlink:href="#31" aria-label="stone" data-expected="name: stone"/>
186 </svg>
187 <svg>
188   <defs>
189     <path id="r32" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
190       <title>rock</title>
191     </path>
192   </defs>
193   <use id="test32" transform="translate(30 345)" xlink:href="#r32" data-expected="name: pebble">
194     <title>pebble</title>
195   </use>
196 </svg>
197 <svg>
198   <defs>
199     <path id="r33" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
200       <title>rock</title>
201     </path>
202   </defs>
203   <use id="test33" transform="translate(30 345)" xlink:href="#r33" data-expected="name: rock"/>
204 </svg>
205 <svg>
206   <defs>
207     <path id="r34" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
208       <title>rock</title>
209     </path>
210   </defs>
211   <use id="test34" transform="translate(30 345)" href="#r34" data-expected="name: rock"/>
212 </svg>
213 <svg>
214   <defs>
215     <path id="r35" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
216       <title lang="en">stone</title>
217     </path>
218   </defs>
219   <use id="test35" transform="translate(30 345)" xlink:href="#r35" data-expected="name: stone"/>
220 </svg>
221 <svg>
222   <defs>
223     <path id="r36" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
224       <title lang="en">stone</title>
225       <title lang="es">piedra</title>
226       <title lang="de">Stein</title>
227     </path>
228   </defs>
229   <use id="test36" transform="translate(30 345)" href="#r36" data-expected="name: stone"/>
230 </svg>
231 <svg>
232   <defs>
233     <path id="r37" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z" lang="es">
234       <title lang="es">piedra</title>
235       <title lang="en">stone</title>
236       <title lang="de">Stein</title>
237     </path>
238   </defs>
239   <use id="test37" transform="translate(30 345)" xlink:href="#r37"  data-expected="name: piedra"/>
240 </svg>
241 <svg>
242   <defs lang="es">
243     <path id="r38" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
244       <title lang="en">stone</title>
245       <title lang="es">piedra</title>
246       <title lang="de">Stein</title>
247     </path>
248   </defs>
249   <use id="test38" transform="translate(30 345)" href="#r38" data-expected="name: piedra"/>
250 </svg>
251 <svg>
252   <defs>
253     <path id="r39" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
254       <title lang="es">piedra</title>
255       <title lang="en">stone</title>
256       <title lang="de">Stein</title>
257     </path>
258   </defs>
259   <g lang="es">
260     <use id="test39" transform="translate(30 345)" xlink:href="#r39" data-expected="name: stone"/>
261   </g>
262 </svg>
263 <svg>
264   <defs>
265     <path id="r40" d="M 8,2 L 10,0 L 7,-5 L 3,-7 L 3,-8 L -9,1 L -5,4 L 1,3 L 2,2 L 5,3 z">
266       <title lang="en">stone</title>
267       <title lang="es">piedra</title>
268       <title lang="de">Stein</title>
269     </path>
270   </defs>
271   <g lang="es">
272     <use id="test40" transform="translate(30 345)" href="#r40" lang="es" data-expected="name: stone"/>
273   </g>
274 </svg>
275 <svg>
276   <path id="test41" d="M 100 100 L 300 100 L 200 300 z" fill="red" data-expected="name: (empty)">
277     <title></title>
278   </path>
279 </svg>
280 <svg>
281   <circle id="test42" cx="10" cy="10" r="5" data-expected="name: (empty)">
282     <title> </title>
283   </circle>
284 </svg>
285 <svg>
286   <ellipse id="test43" cx="10" cy="100" rx="25" ry="15" data-expected="name: (empty)">
287     <title></title>
288     <desc></desc>
289   </ellipse>
290 </svg>
291 <svg>
292   <line id="test44" x1="10" y1="10" x2="50" y2="10" data-expected="name: (empty)">
293     <title> </title>
294     <desc></desc>
295   </line>
296 </svg>
297 <svg>
298   <circle id="test45" cx="10" cy="10" r="5" data-expected="name: (empty)">
299     <title></title>
300     <desc> </desc>
301   </circle>
302 </svg>
303 <svg>
304   <line id="test46" x1="10" y1="10" x2="50" y2="10" data-expected="name: (empty)">
305     <title> </title>
306     <desc>      </desc>
307   </line>
308 </svg>
309 </div>
310 <p id="description"></p>
311 <div id="console"></div>
312 <script>
313     description("This tests the accessible text alternatives results for SVG.");
314     if (window.accessibilityController) {
315         for (var i = 1; i <= 46; i++) {
316             var element = document.getElementById("test" + i);
317             var axElement = accessibilityController.accessibleElementById("test" + i);
318             var result = platformTextAlternatives(axElement, true);
319             debug("test" + i + ":\n\tExpected " + element.getAttribute("data-expected") + "\n" + result);
320         }
321         document.getElementById("content").style.visibility = "hidden";
322     }
323 </script>
324 <script src="../resources/js-test-post.js"></script>
325 </body>
326 </html>
327