|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 <head> |
|
4 <title>SVG elements accessible roles</title> |
|
5 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
|
6 |
|
7 <script type="application/javascript" |
|
8 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
9 |
|
10 <script type="application/javascript" |
|
11 src="../common.js"></script> |
|
12 <script type="application/javascript" |
|
13 src="../role.js"></script> |
|
14 <script type="application/javascript" |
|
15 src="../attributes.js"></script> |
|
16 |
|
17 <script type="application/javascript"> |
|
18 function doTests() |
|
19 { |
|
20 testRole("svg", ROLE_DIAGRAM); |
|
21 testRole("rect", ROLE_GRAPHIC); |
|
22 testRole("circle", ROLE_GRAPHIC); |
|
23 testRole("ellipse", ROLE_GRAPHIC); |
|
24 testRole("line", ROLE_GRAPHIC); |
|
25 testRole("polygon", ROLE_GRAPHIC); |
|
26 testRole("polyline", ROLE_GRAPHIC); |
|
27 testRole("path", ROLE_GRAPHIC); |
|
28 testRole("image", ROLE_GRAPHIC); |
|
29 |
|
30 SimpleTest.finish(); |
|
31 } |
|
32 |
|
33 SimpleTest.waitForExplicitFinish(); |
|
34 addA11yLoadEvent(doTests); |
|
35 </script> |
|
36 </head> |
|
37 <body> |
|
38 |
|
39 <a target="_blank" |
|
40 href="https://bugzilla.mozilla.org/show_bug.cgi?id=822983" |
|
41 title="Map SVG graphic elements to accessibility API"> |
|
42 Bug 822983 |
|
43 </a> |
|
44 |
|
45 <p id="display"></p> |
|
46 <div id="content" style="display: none"></div> |
|
47 <pre id="test"> |
|
48 </pre> |
|
49 |
|
50 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg" |
|
51 xmlns:xlink="http://www.w3.org/1999/xlink"> |
|
52 <rect width="300" height="100" id="rect" |
|
53 style="fill:rgb(0,0,255);stroke-width:1;stroke:rgb(0,0,0)"/> |
|
54 <circle cx="100" cy="50" r="40" stroke="black" id="circle" |
|
55 stroke-width="2" fill="red"/> |
|
56 <ellipse cx="300" cy="80" rx="100" ry="50" id="ellipse" |
|
57 style="fill:yellow;stroke:purple;stroke-width:2"/> |
|
58 <line x1="0" y1="0" x2="200" y2="200" id="line" |
|
59 style="stroke:rgb(255,0,0);stroke-width:2"/> |
|
60 <polygon points="200,10 250,190 160,210" id="polygon" |
|
61 style="fill:lime;stroke:purple;stroke-width:1"/> |
|
62 <polyline points="20,20 40,25 60,40 80,120 120,140 200,180" id="polyline" |
|
63 style="fill:none;stroke:black;stroke-width:3" /> |
|
64 <path d="M150 0 L75 200 L225 200 Z" id="path"/> |
|
65 <image x1="25" y1="80" width="50" height="20" id="image" |
|
66 xlink:href="../moz.png"/> |
|
67 </svg> |
|
68 |
|
69 </body> |
|
70 </html> |