File: test_aria_imgmap.html

package info (click to toggle)
wine-gecko-2.21 2.21%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 646,272 kB
  • ctags: 630,086
  • sloc: cpp: 2,895,786; ansic: 1,502,970; python: 156,675; asm: 115,373; java: 111,421; sh: 63,309; xml: 62,872; makefile: 58,685; perl: 19,182; objc: 3,461; yacc: 2,051; lex: 979; pascal: 929; exp: 449; php: 244; lisp: 228; awk: 211; sed: 26; csh: 21; ada: 16; ruby: 3
file content (108 lines) | stat: -rw-r--r-- 3,344 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html>
<head>
  <title>Test usemap elements and ARIA</title>
  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />

  <script type="application/javascript"
          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  <script type="application/javascript"
          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>

  <script type="application/javascript"
          src="../common.js"></script>
  <script type="application/javascript"
          src="../role.js"></script>
  <script type="application/javascript"
          src="../events.js"></script>
  <script type="application/javascript"
          src="../states.js"></script>

  <script type="application/javascript">
  //gA11yEventDumpToConsole = true;
  function doPreTest()
  {
    waitForImageMap("imagemap", doTest);
  }

  function doTest()
  {
    var accTree = {
      role: ROLE_IMAGE_MAP,
      children: [
        {
          role: ROLE_ENTRY,
          name: "first name"
        },
        {
          role: ROLE_ENTRY,
          name: "last name"
        },
        {
          role: ROLE_RADIOBUTTON,
          name: "male"
        },
        {
          role: ROLE_RADIOBUTTON,
          name: "female"
        },
        {
          role: ROLE_CHECKBUTTON,
          name: "have bike"
        },
        {
          role: ROLE_COMBOBOX,
          name: "bike model"
        },
        {
          role: ROLE_CHECKBUTTON,
          name: "have car"
        },
        {
          role: ROLE_CHECKBUTTON,
          name: "have airplane"
        },
        {
          role: ROLE_PUSHBUTTON,
          name: "submit"
        }
      ]
    };

    // Test image map tree structure, roles, and names.
    testAccessibleTree("imagemap", accTree);

    SimpleTest.finish();
  }

  SimpleTest.waitForExplicitFinish();
  addA11yLoadEvent(doPreTest);
  </script>

</head>
<body>

<a target="_blank"
  href="https://bugzilla.mozilla.org/show_bug.cgi?id=548291"
  title="Accessible tree of ARIA image maps">
Mozilla Bug 548291
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>

<img id="imagemap" src="../formimage.png" width="219" height="229" border="0" usemap="#ariaMap">
<map id="ariaMap" name="ariaMap">
  <area id="t1" role="textbox" shape="rect" tabindex="0" alt="" title="first name"  coords="4,20,108,48" href="#" />
  <area id="t2" role="textbox" shape="rect" alt="" title="last name"  coords="111,21,215,50" href="#" />
  <area id="rb1" role="radio" aria-checked="true" shape="circle" alt="" title="male"  coords="60,75,11" href="#" />
  <area id="rb2" role="radio" shape="circle" alt="" title="female"  coords="73,94,11" href="#" />
  <area id="cb1" role="checkbox" aria-checked="true" shape="rect" alt="" title="have bike"  coords="95,123,118,145" href="#" />
  <area id="cbox" role="combobox" shape="rect" alt="" title="bike model"  coords="120,124,184,146" href="#" />
  <area id="cb2" role="checkbox" shape="rect" alt="" title="have car"  coords="90,145,114,164" href="#" />
  <area id="cb3" role="checkbox" shape="rect" alt="" title="have airplane"  coords="130,163,152,184" href="#" />
  <area id="b1" role="button" shape="rect" alt="" title="submit"  coords="4,198,67,224" href="#" />
</map>
</body>
</html>