1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/states/test_aria_imgmap.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,79 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 + <title>Test usemap elements and ARIA</title> 1.8 + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 1.9 + 1.10 + <script type="application/javascript" 1.11 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <script type="application/javascript" 1.13 + src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> 1.14 + 1.15 + <script type="application/javascript" 1.16 + src="../common.js"></script> 1.17 + <script type="application/javascript" 1.18 + src="../role.js"></script> 1.19 + <script type="application/javascript" 1.20 + src="../events.js"></script> 1.21 + <script type="application/javascript" 1.22 + src="../states.js"></script> 1.23 + 1.24 + <script type="application/javascript"> 1.25 + //gA11yEventDumpToConsole = true; 1.26 + function doPreTest() 1.27 + { 1.28 + waitForImageMap("imagemap", doTest); 1.29 + } 1.30 + 1.31 + function doTest() 1.32 + { 1.33 + var imageMap = getAccessible("imagemap"); 1.34 + 1.35 + var t1 = imageMap.getChildAt(0); 1.36 + testStates(t1, 0, EXT_STATE_EDITABLE, STATE_LINKED); 1.37 + var t2 = imageMap.getChildAt(1); 1.38 + testStates(t2, 0, EXT_STATE_EDITABLE, STATE_LINKED); 1.39 + var rb1 = imageMap.getChildAt(2); 1.40 + testStates(rb1, (STATE_CHECKABLE | STATE_CHECKED), 0, STATE_LINKED); 1.41 + var rb2 = imageMap.getChildAt(3); 1.42 + testStates(rb2, STATE_CHECKABLE, 0, STATE_CHECKED, STATE_LINKED); 1.43 + var cb1 = imageMap.getChildAt(4); 1.44 + testStates(cb1, (STATE_CHECKABLE | STATE_CHECKED), 0, STATE_LINKED); 1.45 + var cbox = imageMap.getChildAt(5); 1.46 + testStates(cbox, (STATE_HASPOPUP | STATE_COLLAPSED), 1.47 + EXT_STATE_EXPANDABLE, STATE_LINKED); 1.48 + 1.49 + SimpleTest.finish(); 1.50 + } 1.51 + 1.52 + SimpleTest.waitForExplicitFinish(); 1.53 + addA11yLoadEvent(doPreTest); 1.54 + </script> 1.55 + 1.56 +</head> 1.57 +<body> 1.58 + 1.59 +<a target="_blank" 1.60 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=548291" 1.61 + title="ARIA states on image maps"> 1.62 +Mozilla Bug 548291 1.63 +</a> 1.64 +<p id="display"></p> 1.65 +<div id="content" style="display: none"></div> 1.66 +<pre id="test"> 1.67 +</pre> 1.68 + 1.69 +<img id="imagemap" src="../formimage.png" width="219" height="229" border="0" usemap="#ariaMap"> 1.70 +<map id="ariaMap" name="ariaMap"> 1.71 + <area id="t1" role="textbox" shape="rect" tabindex="0" alt="" title="first name" coords="4,20,108,48" href="#" /> 1.72 + <area id="t2" role="textbox" shape="rect" alt="" title="last name" coords="111,21,215,50" href="#" /> 1.73 + <area id="rb1" role="radio" aria-checked="true" shape="circle" alt="" title="male" coords="60,75,11" href="#" /> 1.74 + <area id="rb2" role="radio" shape="circle" alt="" title="female" coords="73,94,11" href="#" /> 1.75 + <area id="cb1" role="checkbox" aria-checked="true" shape="rect" alt="" title="have bike" coords="95,123,118,145" href="#" /> 1.76 + <area id="cbox" role="combobox" shape="rect" alt="" title="bike model" coords="120,124,184,146" href="#" /> 1.77 + <area id="cb2" role="checkbox" shape="rect" alt="" title="have car" coords="90,145,114,164" href="#" /> 1.78 + <area id="cb3" role="checkbox" shape="rect" alt="" title="have airplane" coords="130,163,152,184" href="#" /> 1.79 + <area id="b1" role="button" shape="rect" alt="" title="submit" coords="4,198,67,224" href="#" /> 1.80 +</map> 1.81 +</body> 1.82 +</html>