Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / w3c-svg-elements-not-exposed.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 <div id="content">
8 <svg>
9   <rect x="5" y="5" width="20" height="15">
10     <animate id="test1" attributeName="opacity" from="1" to="0" dur="5s" repeatCount="indefinite"/>
11   </rect>
12 </svg>
13 <svg>
14   <path id="path2" d="M100,250 C 100,50 400,50 400,222" fill="none" stroke="blue" stroke-width="7.06" />
15   <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z" fill="yellow" stroke="red" stroke-width="7.06">
16     <animateMotion id="test2" dur="6s" repeatCount="indefinite" rotate="auto">
17       <mpath href="#path2"/>
18     </animateMotion>
19   </path>
20 </svg>
21 <svg>
22   <rect width="100" height="100">
23     <animateTransform id="test3" attributeName="transform" type="scale" from="2" to="3" repeatCount="3" dur="4s" fill="freeze"/>
24   </rect>
25 </svg>
26 <svg>
27   <defs>
28     <clipPath id="test4">
29       <rect x="0" y="0" width="200" height="100"/>
30     </clipPath>
31   </defs>
32   <circle cx="100" cy="100" r="100" clip-path="url(#test4)" />
33 </svg>
34 <svg>
35   <cursor id="test5" xlink:href="cursor.png" x="4" y="0"/>
36 </svg>
37 <svg>
38   <defs id="test6">
39     <solidColor id="MyLightPurple" solid-color="#a080ff" solid-opacity="0.5"/>
40   </defs>
41 </svg>
42 <svg>
43   <ellipse cx="98.5" cy="17.5" rx="20.5" ry="17.5" fill="blue" stroke="black" transform="translate(9 252) translate(3 -296)">
44     <animateTransform attributeName="transform" begin="0s" dur="2s" fill="remove" calcMode="linear" type="translate" additive="sum" from="0 0" to="-18 305"/>
45     <discard id="test7" begin="2s"/>
46   </ellipse>
47 </svg>
48 <svg>
49   <hatch id="test8" hatchUnits="userSpaceOnUse" pitch="5" rotate="17">
50     <hatchpath stroke="#a080ff" stroke-width="2"/>
51   </hatch>
52 </svg>
53 <svg>
54   <hatch hatchUnits="userSpaceOnUse" pitch="5" rotate="17">
55     <hatchpath id="test9" stroke="#a080ff" stroke-width="2"/>
56   </hatch>
57 </svg>
58 <svg>
59   <defs>
60     <linearGradient id="test10">
61       <stop offset="5%" stop-color="#A8F"/>
62       <stop offset="95%" stop-color="#FDC"/>
63     </linearGradient>
64   </defs>
65 </svg>
66 <svg>
67   <marker id="test11" orient="auto" overflow="visible">
68     <rect x="-1" y="-0.5" width="1" height="1" fill="green"/>
69   </marker>
70 </svg>
71 <svg>
72   <defs>
73     <linearGradient id="Gradient12">
74       <stop offset="0" stop-color="white" stop-opacity="0"/>
75       <stop offset="1" stop-color="white" stop-opacity="1"/>
76     </linearGradient>
77     <mask id="test12">
78       <rect x="0" y="0" width="200" height="200" fill="url(#Gradient12)"/>
79     </mask>
80   </defs>
81   <rect x="0" y="0" width="200" height="200" fill="red" mask="url(#test12)"/>
82 </svg>
83 <svg>
84   <mesh x="22" y="22" id="example13">
85     <meshrow>
86       <meshpatch id="test13">
87         <stop path="c 25,-25 75, 25 100,0" stop-color="lightblue"/>
88         <stop path="c 25, 25 -25, 75 0,100" stop-color="purple"/>
89         <stop path="c -25, 25 -75,-25 -100,0" stop-color="red"/>
90         <stop path="c -25,-25, 25,-75" stop-color="purple"/>
91       </meshpatch>
92       <meshpatch>
93         <stop path="c 25,-25 75, 25 100,0"/>
94         <stop path="c 25, 25 -25, 75 0,100" stop-color="lightblue"/>
95         <stop path="c -25, 25 -75,-25" stop-color="purple"/>
96       </meshpatch>
97     </meshrow>
98     <meshrow>
99       <meshpatch>
100         <stop path="c 25, 25 -25, 75 0,100"/>
101         <stop path="c -25, 25 -75,-25 -100,0" stop-color="purple"/>
102         <stop path="c -25,-25, 25,-75" stop-color="lightblue"/>
103       </meshpatch>
104       <meshpatch>
105         <stop path="c 25, 25 -25, 75 0,100"/>
106         <stop path="c -25, 25 -75,-25" stop-color="lightblue"/>
107       </meshpatch>
108     </meshrow>
109   </mesh>
110 </svg>
111 <svg>
112   <mesh x="22" y="22" id="example14">
113     <meshrow id="test14">
114       <meshpatch>
115         <stop path="c 25,-25 75, 25 100,0" stop-color="lightblue"/>
116         <stop path="c 25, 25 -25, 75 0,100" stop-color="purple"/>
117         <stop path="c -25, 25 -75,-25 -100,0" stop-color="red"/>
118         <stop path="c -25,-25, 25,-75" stop-color="purple"/>
119       </meshpatch>
120       <meshpatch>
121         <stop path="c 25,-25 75, 25 100,0"/>
122         <stop path="c 25, 25 -25, 75 0,100" stop-color="lightblue"/>
123         <stop path="c -25, 25 -75,-25" stop-color="purple"/>
124       </meshpatch>
125     </meshrow>
126     <meshrow>
127       <meshpatch>
128         <stop path="c 25, 25 -25, 75 0,100"/>
129         <stop path="c -25, 25 -75,-25 -100,0" stop-color="purple"/>
130         <stop path="c -25,-25, 25,-75" stop-color="lightblue"/>
131       </meshpatch>
132       <meshpatch>
133         <stop path="c 25, 25 -25, 75 0,100"/>
134         <stop path="c -25, 25 -75,-25" stop-color="lightblue"/>
135       </meshpatch>
136     </meshrow>
137   </mesh>
138 </svg>
139 <svg>
140   <metadata id="test15">
141     <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/">
142       <rdf:Description about="http://example.org/myfoo" dc:title="MyFoo Financial Report" dc:language="en"></rdf:Description>
143     </rdf:RDF>
144   </metadata>
145 </svg>
146 <svg>
147   <path id="path16" d="M100,250 C 100,50 400,50 400,222" fill="none" stroke="blue" stroke-width="7.06"/>
148   <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z" fill="yellow" stroke="red" stroke-width="7.06">
149     <animateMotion dur="6s" repeatCount="indefinite" rotate="auto">
150       <mpath id="test16" xlink:href="#path16"/>
151     </animateMotion>
152   </path>
153 </svg>
154 <svg>
155   <pattern id="test17" x="10" y="10" width="20" height="20">
156     <rect x="5" y="5" width="10" height="10"/>
157   </pattern>
158 </svg>
159 <svg>
160   <radialGradient id="test18" gradientUnits="userSpaceOnUse" cx="122" cy="100" r="100">
161     <stop offset="0%" stop-color="#A8F"/>
162     <stop offset="50%" stop-color="#FDC"/>
163     <stop offset="100%" stop-color="#A8F"/>
164   </radialGradient>
165 </svg>
166 <svg>
167   <defs>
168     <solidColor id="test19" solid-color="#a080ff" solid-opacity="0.5"/>
169   </defs>
170 </svg>
171 <svg>
172   <defs>
173     <linearGradient id="lg20">
174       <stop id="test20" offset="5%" stop-color="#A8F"/>
175       <stop offset="95%" stop-color="#FDC"/>
176     </linearGradient>
177   </defs>
178 </svg>
179 <svg>
180   <style id="test21">@import url(mystyles.css);</style>
181 </svg>
182 <svg>
183   <symbol id="test22" viewBox="0 0 20 20">
184     <desc>MySymbol - four rectangles in a grid</desc>
185     <rect x="1" y="1" width="8" height="8"/>
186     <rect x="11" y="1" width="8" height="8"/>
187     <rect x="1" y="11" width="8" height="8"/>
188     <rect x="11" y="11" width="8" height="8"/>
189   </symbol>
190 </svg>
191 <svg>
192   <title id="test23">abc</title>
193 </svg>
194 <svg>
195   <path id="test24" d="M 100 100 L 300 100 L 200 300 z" fill="red" stroke="blue" stroke-width="3"/>
196 </svg>
197 <svg>
198   <rect id="test25" x="10" y="10" width="50" height="30"/>
199 </svg>
200 <svg>
201   <circle id="test26" cx="10" cy="10" r="5"/>
202 </svg>
203 <svg>
204   <ellipse id="test27" cx="10" cy="100" rx="25" ry="15"/>
205 </svg>
206 <svg>
207   <line id="test28" x1="10" y1="10" x2="50" y2="10"/>
208 </svg>
209 <svg>
210   <polyline id="test29" fill="none" stroke="blue" stroke-width="10" points="50,375 150,375 150,325 250,325 250,375 350,375 350,250 450,250 450,375 550,375 550,175 650,175 650,375 750,375 750,100 850,100 850,375 950,375 950,25 1050,25 1050,375 1150,375"/>
211 </svg>
212 <svg>
213   <polygon id="test30" fill="magenta" points="850,75 958,137.5 958,262.5 850,325 742,262.6 742,137.5"/>
214 </svg>
215 <svg>
216   <defs>
217     <filter id="test31" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="120">
218       <feGaussianBlur id="test32" in="SourceAlpha" stdDeviation="4" result="blur"/>
219       <feOffset id="test33" in="blur" dx="4" dy="4" result="offsetBlur"/>
220       <feSpecularLighting id="test34" in="blur" surfaceScale="5" specularConstant=".75" 
221                           specularExponent="20" lighting-color="#bbbbbb"  
222                           result="specOut">
223         <fePointLight id="test35" x="-5000" y="-10000" z="20000"/>
224      </feSpecularLighting>
225      <feComposite id="test36" in="specOut" in2="SourceAlpha" operator="in" result="specOut"/>
226      <feComposite in="SourceGraphic" in2="specOut" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" result="litPaint"/>
227      <feMerge id="test37">
228        <feMergeNode id="test38" in="offsetBlur"/>
229        <feMergeNode in="litPaint"/>
230      </feMerge>
231    </filter>
232  </defs>
233  <rect x="1" y="1" width="198" height="118" fill="#888888" stroke="blue"/>
234  <g filter="url(#test31)" >
235    <g>
236      <path fill="none" stroke="#D90000" stroke-width="10" d="M50,90 C0,90 0,30 50,30 L150,30 C200,30 200,90 150,90 z"/>
237      <path fill="#D90000" d="M60,80 C30,80 30,40 60,40 L140,40 C170,40 170,80 140,80 z"/>
238      <g fill="#FFFFFF" stroke="black" font-size="45" font-family="Verdana">
239        <text x="52" y="76">SVG</text>
240      </g>
241    </g>
242  </g>
243 </svg>
244 <svg>
245   <g aria-hidden="true">
246     <rect id="test39" aria-label="hello" x="10" y="10" width="50" height="30"/>
247   </g>
248 </svg>
249 <svg>
250   <g aria-hidden="true">
251     <ellipse id="test40" cx="10" cy="100" rx="25" ry="15">
252       <title>abc</title>
253    </ellipse>
254   </g>
255 </svg>
256 <svg>
257   <g aria-hidden="true">
258     <line id="test41" aria-label="hello" x1="10" y1="10" x2="50" y2="10"/>
259   </g>
260 </svg>
261 <svg>
262   <g aria-hidden="true">
263     <polyline id="test42" aria-label="hello" fill="none" stroke="blue" stroke-width="10" points="50,375 150,375 150,325 250,325 250,375 350,375 350,250 450,250 450,375 550,375 550,175 650,175 650,375 750,375 750,100 850,100 850,375 950,375 950,25 1050,25 1050,375 1150,375"/>
264   </g>
265 </svg>
266 <svg>
267   <g aria-hidden="true">
268     <polygon id="test43" fill="magenta" points="850,75 958,137.5 958,262.5 850,325 742,262.6 742,137.5">
269       <desc>built up area</desc>
270     </polygon>
271   </g>
272 </svg>
273 <svg>
274   <rect id="test44" aria-label="hello" x="10" y="10" width="50" height="30" aria-hidden="true"/>
275 </svg>
276 <svg>
277   <ellipse id="test45" cx="10" cy="100" rx="25" ry="15" aria-hidden="true">
278     <title>abc</title>
279   </ellipse>
280 </svg>
281 <svg>
282   <line id="test46" aria-label="hello" x1="10" y1="10" x2="50" y2="10" aria-hidden="true"/>
283 </svg>
284 <svg>
285   <polyline id="test47" aria-label="hello" fill="none" stroke="blue" stroke-width="10" points="50,375 150,375 150,325 250,325 250,375 350,375 350,250 450,250 450,375 550,375 550,175 650,175 650,375 750,375 750,100 850,100 850,375 950,375 950,25 1050,25 1050,375 1150,375" aria-hidden="true"/>
286 </svg>
287 <svg>
288   <polygon id="test48" fill="magenta" points="850,75 958,137.5 958,262.5 850,325 742,262.6 742,137.5" aria-hidden="true">
289     <desc>built up area</desc>
290   </polygon>
291 </svg>
292 <svg>
293   <circle cx="50" cy="50" r="40" id="test49" style="display: none;">
294     <title>Mars</title>
295   </circle>
296 </svg>
297 <svg>
298   <style>
299    /* <![CDATA[ */
300    circle {display: none; }
301    /* ]]> */
302   </style>
303   <circle cx="50" cy="50" r="40" id="test50">
304     <title>Mars</title>
305   </circle>
306 </svg>
307 </div>
308 <p id="description"></p>
309 <div id="console"></div>
310 <script>
311     description("This tests that SVG elements which should not be exposed are not exposed.");
312     if (window.accessibilityController) {
313         for (var i = 1; i <= 50; i++) {
314             var element = document.getElementById("test" + i);
315             var axElement = accessibilityController.accessibleElementById("test" + i);
316             debug("test" + i + ": " + (axElement ? axElement.role : "Element not exposed"));
317         }
318         document.getElementById("content").style.visibility = "hidden";
319     }
320 </script>
321 <script src="../resources/js-test-post.js"></script>
322 </body>
323 </html>