accessible/tests/mochitest/elm/test_figure.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>HTML5 figure/figcaption tests</title>
michael@0 5 <link rel="stylesheet" type="text/css"
michael@0 6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 7
michael@0 8 <script type="application/javascript"
michael@0 9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 10
michael@0 11 <script type="application/javascript"
michael@0 12 src="../common.js"></script>
michael@0 13 <script type="application/javascript"
michael@0 14 src="../role.js"></script>
michael@0 15 <script type="application/javascript"
michael@0 16 src="../attributes.js"></script>
michael@0 17 <script type="application/javascript"
michael@0 18 src="../relations.js"></script>
michael@0 19 <script type="application/javascript"
michael@0 20 src="../name.js"></script>
michael@0 21
michael@0 22 <script type="application/javascript">
michael@0 23
michael@0 24 function doTest()
michael@0 25 {
michael@0 26 testRole("figure", ROLE_FIGURE);
michael@0 27 testRole("figcaption", ROLE_CAPTION);
michael@0 28
michael@0 29 todo(false, "figure name gets extra whitespace in the end!");
michael@0 30 testName("figure", "figure caption ");
michael@0 31 testName("figcaption", null);
michael@0 32
michael@0 33 testRelation("figure", RELATION_LABELLED_BY, "figcaption");
michael@0 34 testRelation("figcaption", RELATION_LABEL_FOR, "figure");
michael@0 35
michael@0 36 testAttrs("figure", {"xml-roles" : "figure"}, true);
michael@0 37
michael@0 38 SimpleTest.finish();
michael@0 39 }
michael@0 40
michael@0 41 SimpleTest.waitForExplicitFinish();
michael@0 42 addA11yLoadEvent(doTest);
michael@0 43 </script>
michael@0 44 </head>
michael@0 45 <body>
michael@0 46
michael@0 47 <a target="_blank"
michael@0 48 title="Implement figure and figcaption accessibility"
michael@0 49 href="https://bugzilla.mozilla.org/show_bug.cgi?id=658272">
michael@0 50 Mozilla Bug 658272
michael@0 51 </a><br/>
michael@0 52 <p id="display"></p>
michael@0 53 <div id="content" style="display: none"></div>
michael@0 54 <pre id="test">
michael@0 55 </pre>
michael@0 56
michael@0 57 <figure id="figure">
michael@0 58 <figcaption id="figcaption">figure caption</figcaption>
michael@0 59 </figure>
michael@0 60
michael@0 61 </body>
michael@0 62 </html>

mercurial