Update device orientation & motion permission native SPI as per latest proposal
[WebKit-https.git] / LayoutTests / accessibility / w3c-svg-description-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-describedby="t1" cx="50" cy="100" r="15" data-expected="description: end">
11     <title>abc</title>
12     <desc>123</desc>
13   </circle>
14   <text id="t1" x="40" y="90">end</text>
15 </svg>
16 <svg>
17   <circle id="test2" aria-describedby="t2" cx="50" cy="100" r="15" data-expected="description: end">
18     <desc>123</desc>
19   </circle>
20   <text id="t2" x="40" y="90">end</text>
21 </svg>
22 <svg>
23   <circle id="test3" aria-describedby="t3" cx="50" cy="100" r="15" data-expected="description: end">
24     <title>abc</title>
25   </circle>
26   <text id="t3" x="40" y="90">end</text>
27 </svg>
28 <svg>
29   <circle id="test4" aria-describedby="t4" cx="50" cy="100" r="15" data-expected="description: end"/>
30   <text id="t4" x="40" y="90">end</text>
31 </svg>
32 <svg>
33   <circle id="test5" cx="50" cy="100" r="15" data-expected="description: 123">
34     <title>abc</title>
35     <desc>123</desc>
36   </circle>
37 </svg>
38 <svg>
39   <circle id="test6" cx="50" cy="100" r="15" data-expected="description: 123">
40     <desc>123</desc>
41   </circle>
42 </svg>
43 <svg>
44   <circle id="test7" aria-describedby="t7" cx="50" cy="100" r="15" data-expected="description: end">
45     <title>abc</title>
46     <desc lang="en">123</desc>
47     <desc lang="es">456</desc>
48   </circle>
49   <text id="t7" x="40" y="90">end</text>
50 </svg>
51 <svg>
52   <circle id="test8" cx="50" cy="100" r="15" data-expected="description: 554">
53     <title lang="en">abc</title>
54     <title lang="de">def</title>
55     <desc lang="fr">123</desc>
56     <desc lang="en">554</desc>
57     <desc lang="es">432</desc>
58   </circle>
59 </svg>
60 <svg>
61   <circle id="test9" cx="50" cy="100" r="15" data-expected="description: 567">
62     <desc lang="es">432</desc>
63     <desc lang="fr">123</desc>
64     <desc lang="en">567</desc>
65   </circle>
66 </svg>
67 <svg>
68   <g lang="fr">
69     <circle id="test10" cx="50" cy="100" r="15" data-expected="description: 123">
70       <title lang="en">abc</title>
71       <title lang="de">def</title>
72       <desc lang="fr">123</desc>
73       <desc lang="en">554</desc>
74       <desc lang="es">432</desc>
75     </circle>
76   </g>
77 </svg>
78 <svg>
79   <g lang="fr">
80     <circle id="test11" cx="50" cy="100" r="15" data-expected="description: 123">
81       <desc lang="es">432</desc>
82       <desc lang="fr">123</desc>
83       <desc lang="en">567</desc>
84     </circle>
85   </g>
86 </svg>
87 <svg>
88   <circle id="test12" aria-describedby="" cx="50" cy="100" r="15" data-expected="description: 123">
89     <title>abc</title>
90     <desc>123</desc>
91   </circle>
92 </svg>
93 <svg>
94   <circle id="test13" aria-describedby="" cx="50" cy="100" r="15" data-expected="description: 12">
95     <desc>12</desc>
96   </circle>
97 </svg>
98 <svg>
99   <circle id="test14" aria-describedby="" cx="50" cy="100" r="15" data-expected="description: (empty)">
100     <title>abc</title>
101   </circle>
102 </svg>
103 <svg>
104   <circle id="test15" aria-describedby="" cx="50" cy="100" r="15" tabindex="0" data-expected="description: (empty)"/>
105 </svg>
106 <svg>
107   <circle id="test16" aria-describedby="" cx="50" cy="100" r="15" data-expected="description: 222">
108     <title>abc</title>
109     <desc lang="fr">123</desc>
110     <desc lang="en">222</desc>
111     <desc lang="es">432</desc>
112   </circle>
113 </svg>
114 <svg>
115   <circle id="test17" aria-describedby="" cx="50" cy="100" r="15" data-expected="description: 911">
116     <desc lang="fr">123</desc>
117     <desc lang="es">444</desc>
118     <desc lang="en">911</desc>
119   </circle>
120 </svg>
121 <svg>
122   <g lang="fr">
123     <circle id="test18" aria-describedby="" cx="50" cy="100" r="15" data-expected="description: 123">
124       <title>abc</title>
125       <desc lang="fr">123</desc>
126       <desc lang="en">222</desc>
127       <desc lang="es">432</desc>
128     </circle>
129   </g>
130 </svg>
131 <svg>
132   <g lang="fr">
133     <circle id="test19" aria-describedby="" cx="50" cy="100" r="15" data-expected="description: 123">
134       <desc lang="es">444</desc>
135       <desc lang="fr">123</desc>
136       <desc lang="en">911</desc>
137     </circle>
138   </g>
139 </svg>
140 <svg>
141   <circle id="test20" aria-describedby="t20a t20b" cx="50" cy="100" r="15" data-expected="description: the end"/>
142   <text id="t20a" x="40" y="90">the</text>
143   <text id="t20b" x="140" y="90">end</text>
144 </svg>
145 <svg>
146   <circle id="test21" aria-describedby="t21a t21b" cx="50" cy="100" r="15" data-expected="description: the end"/>
147   <text id="t21a" x="40" y="90">the</text>
148   <text id="t21b" x="140" y="90" aria-describedby="t2c">end</text>
149   <text id="t21c" x="180" y="90">finish</text>
150 </svg>
151 <svg>
152   <circle id="test22" aria-describedby="t22a t22b" cx="50" cy="100" r="15" data-expected="description: end"/>
153   <text id="t22b" x="40" y="90">end</text>
154 </svg>
155 <svg>
156   <circle id="test23" aria-labelledby="t23" cx="50" cy="100" r="15" data-expected="description: abc">
157     <title>abc</title>
158   </circle>
159   <text id="t23" x="40" y="90">end</text>
160 </svg>
161 <svg>
162   <circle id="test24" aria-label="bob" cx="50" cy="100" r="15" data-expected="description: abc">
163     <title>abc</title>
164   </circle>
165 </svg>
166 <svg>
167   <circle id="test25" aria-labelledby="t25" cx="50" cy="100" r="15" data-expected="description: counter">
168     <title lang="es">barra</title>
169     <title lang="en">counter</title>
170     <title lang="fr">guichet</title>
171   </circle>
172   <text id="t25" x="40" y="90">end</text>
173 </svg>
174 <svg>
175   <circle id="test26" aria-label="bob" cx="50" cy="100" r="15" data-expected="description: counter">
176     <title lang="fr">guichet</title>
177     <title lang="es">barra</title>
178     <title lang="en">counter</title>
179   </circle>
180 </svg>
181 <svg>
182   <circle id="test27" aria-labelledby="t27" cx="50" cy="100" r="15" lang="es" data-expected="description: barra">
183     <title lang="es">barra</title>
184     <title lang="en">counter</title>
185     <title lang="fr">guichet</title>
186   </circle>
187   <text id="t27" x="40" y="90">end</text>
188 </svg>
189 <svg>
190   <g lang="es" aria-label="hola">
191     <circle id="test28" aria-label="bob" cx="50" cy="100" r="15" data-expected="description: barra">
192       <title lang="fr">guichet</title>
193       <title lang="es">barra</title>
194       <title lang="en">counter</title>
195     </circle>
196   </g>
197 </svg>
198 <svg>
199   <circle id="test29" aria-labelledby="t29" cx="50" cy="100" r="15" data-expected="description: (empty)">
200     <title>abc</title>
201   </circle>
202   <text id="t29" x="40" y="90">abc</text>
203 </svg>
204 <svg>
205   <circle id="test30" aria-label="bob" cx="50" cy="100" r="15" data-expected="description: (empty)">
206     <title>bob</title>
207   </circle>
208 </svg>
209 <svg>
210   <circle id="test31" aria-labelledby="t31" cx="50" cy="100" r="15" data-expected="description: (empty)">
211     <title lang="es">soy</title>
212     <title lang="en">abc</title>
213     <title lang="fr">le</title>
214   </circle>
215   <text id="t31" x="40" y="90">abc</text> then accessible description = BLANK
216 </svg>
217 <svg>
218   <circle id="test32" aria-label="bob" cx="50" cy="100" r="15" data-expected="description: (empty)">
219     <title lang="en">bob</title>
220     <title lang="fr">dan</title>
221     <title lang="es">juan</title>
222   </circle>
223 </svg>
224 <svg>
225   <circle id="test33" aria-label="bob" cx="50" cy="100" r="15" data-expected="description: (empty)">
226     <title lang="fr">dan</title>
227     <title lang="es">juan</title>
228     <title lang="en">bob</title>
229   </circle>
230 </svg>
231 <svg>
232   <a id="test34" aria-labelledby="t34" aria-label="booth" href="../index.html" xlink:title="table" data-expected="description: (empty)"></a>
233   <text id="t34" x="40" y="90">end</text>
234 </svg>
235 <svg>
236   <a id="test35" aria-labelledby="t35" href="../index.html" xlink:title="table" data-expected="description: (empty)"></a>
237   <text id="t35" x="40" y="90">end</text>
238 </svg>
239 <svg>
240   <a id="test36" aria-label="booth" href="../index.html" xlink:title="table" data-expected="description: (empty)"></a>
241 </svg>
242 <svg>
243   <a id="test37" href="../index.html" xlink:title="table" data-expected="description: (empty)">
244     <title>counter</title>
245   </a>
246 </svg>
247 <svg>
248   <a id="test38" href="../index.html" xlink:title="table" data-expected="description: (empty)"></a>
249 </svg>
250 <svg>
251   <ellipse id="test39" cx="10" cy="100" rx="25" ry="15" data-expected="description: (empty)">
252     <title></title>
253     <desc></desc>
254   </ellipse>
255 </svg>
256 <svg>
257   <circle id="test40" cx="10" cy="10" r="5" data-expected="description: (empty)">
258     <title></title>
259     <desc> </desc>
260   </circle>
261 </svg>
262 <svg>
263   <line id="test41" x1="10" y1="10" x2="50" y2="10" data-expected="description: (empty)">
264     <title> </title>
265     <desc>      </desc>
266   </line>
267 </svg>
268 <svg>
269   <polygon id="test42" fill="magenta" points="850,75 958,137.5 958,262.5 850,325 742,262.6 742,137.5" data-expected="description: (empty)">
270     <desc></desc>
271   </polygon>
272 </svg>
273 <svg>
274   <rect id="test43" x="10" y="10" width="50" height="30" data-expected="description: (empty)">
275     <desc>     </desc>
276   </rect>
277 </svg>
278 </div>
279 <p id="description"></p>
280 <div id="console"></div>
281 <script>
282     description("This tests the accessible text alternatives results for SVG.");
283     if (window.accessibilityController) {
284         for (var i = 1; i <= 43; i++) {
285             var element = document.getElementById("test" + i);
286             var axElement = accessibilityController.accessibleElementById("test" + i);
287             var result = platformTextAlternatives(axElement);
288             debug("test" + i + ":\n\tExpected " + element.getAttribute("data-expected") + "\n" + result);
289         }
290         document.getElementById("content").style.visibility = "hidden";
291     }
292 </script>
293 <script src="../resources/js-test-post.js"></script>
294 </body>
295 </html>
296