accessible/tests/mochitest/tree/test_aria_imgmap.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>Test usemap elements and ARIA</title>
michael@0 5 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 6
michael@0 7 <script type="application/javascript"
michael@0 8 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 9 <script type="application/javascript"
michael@0 10 src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
michael@0 11
michael@0 12 <script type="application/javascript"
michael@0 13 src="../common.js"></script>
michael@0 14 <script type="application/javascript"
michael@0 15 src="../role.js"></script>
michael@0 16 <script type="application/javascript"
michael@0 17 src="../events.js"></script>
michael@0 18 <script type="application/javascript"
michael@0 19 src="../states.js"></script>
michael@0 20
michael@0 21 <script type="application/javascript">
michael@0 22 //gA11yEventDumpToConsole = true;
michael@0 23 function doPreTest()
michael@0 24 {
michael@0 25 waitForImageMap("imagemap", doTest);
michael@0 26 }
michael@0 27
michael@0 28 function doTest()
michael@0 29 {
michael@0 30 var accTree = {
michael@0 31 role: ROLE_IMAGE_MAP,
michael@0 32 children: [
michael@0 33 {
michael@0 34 role: ROLE_ENTRY,
michael@0 35 name: "first name"
michael@0 36 },
michael@0 37 {
michael@0 38 role: ROLE_ENTRY,
michael@0 39 name: "last name"
michael@0 40 },
michael@0 41 {
michael@0 42 role: ROLE_RADIOBUTTON,
michael@0 43 name: "male"
michael@0 44 },
michael@0 45 {
michael@0 46 role: ROLE_RADIOBUTTON,
michael@0 47 name: "female"
michael@0 48 },
michael@0 49 {
michael@0 50 role: ROLE_CHECKBUTTON,
michael@0 51 name: "have bike"
michael@0 52 },
michael@0 53 {
michael@0 54 role: ROLE_COMBOBOX,
michael@0 55 name: "bike model"
michael@0 56 },
michael@0 57 {
michael@0 58 role: ROLE_CHECKBUTTON,
michael@0 59 name: "have car"
michael@0 60 },
michael@0 61 {
michael@0 62 role: ROLE_CHECKBUTTON,
michael@0 63 name: "have airplane"
michael@0 64 },
michael@0 65 {
michael@0 66 role: ROLE_PUSHBUTTON,
michael@0 67 name: "submit"
michael@0 68 }
michael@0 69 ]
michael@0 70 };
michael@0 71
michael@0 72 // Test image map tree structure, roles, and names.
michael@0 73 testAccessibleTree("imagemap", accTree);
michael@0 74
michael@0 75 SimpleTest.finish();
michael@0 76 }
michael@0 77
michael@0 78 SimpleTest.waitForExplicitFinish();
michael@0 79 addA11yLoadEvent(doPreTest);
michael@0 80 </script>
michael@0 81
michael@0 82 </head>
michael@0 83 <body>
michael@0 84
michael@0 85 <a target="_blank"
michael@0 86 href="https://bugzilla.mozilla.org/show_bug.cgi?id=548291"
michael@0 87 title="Accessible tree of ARIA image maps">
michael@0 88 Mozilla Bug 548291
michael@0 89 </a>
michael@0 90 <p id="display"></p>
michael@0 91 <div id="content" style="display: none"></div>
michael@0 92 <pre id="test">
michael@0 93 </pre>
michael@0 94
michael@0 95 <img id="imagemap" src="../formimage.png" width="219" height="229" border="0" usemap="#ariaMap">
michael@0 96 <map id="ariaMap" name="ariaMap">
michael@0 97 <area id="t1" role="textbox" shape="rect" tabindex="0" alt="" title="first name" coords="4,20,108,48" href="#" />
michael@0 98 <area id="t2" role="textbox" shape="rect" alt="" title="last name" coords="111,21,215,50" href="#" />
michael@0 99 <area id="rb1" role="radio" aria-checked="true" shape="circle" alt="" title="male" coords="60,75,11" href="#" />
michael@0 100 <area id="rb2" role="radio" shape="circle" alt="" title="female" coords="73,94,11" href="#" />
michael@0 101 <area id="cb1" role="checkbox" aria-checked="true" shape="rect" alt="" title="have bike" coords="95,123,118,145" href="#" />
michael@0 102 <area id="cbox" role="combobox" shape="rect" alt="" title="bike model" coords="120,124,184,146" href="#" />
michael@0 103 <area id="cb2" role="checkbox" shape="rect" alt="" title="have car" coords="90,145,114,164" href="#" />
michael@0 104 <area id="cb3" role="checkbox" shape="rect" alt="" title="have airplane" coords="130,163,152,184" href="#" />
michael@0 105 <area id="b1" role="button" shape="rect" alt="" title="submit" coords="4,198,67,224" href="#" />
michael@0 106 </map>
michael@0 107 </body>
michael@0 108 </html>

mercurial