2008-10-31 05:19:28 -07:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<!--
|
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=428479
|
|
|
|
-->
|
|
|
|
<head>
|
|
|
|
<title>ARIA role math chrome tests</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
|
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
2009-03-07 03:23:25 -08:00
|
|
|
<script type="application/javascript"
|
|
|
|
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
|
2008-10-31 05:19:28 -07:00
|
|
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
function testThis(aID)
|
|
|
|
{
|
2009-03-07 03:23:25 -08:00
|
|
|
getRole(aID, ROLE_FLAT_EQUATION);
|
2008-10-31 05:19:28 -07:00
|
|
|
var eqAcc = getAccessible(aID);
|
2009-03-07 03:23:25 -08:00
|
|
|
if (eqAcc)
|
2008-10-31 05:19:28 -07:00
|
|
|
is(eqAcc.name, "x^2 + y^2 + z^2", "Wrong name for " + aID + "!");
|
|
|
|
}
|
|
|
|
|
|
|
|
function doTest()
|
|
|
|
{
|
|
|
|
// Test equation image
|
|
|
|
testThis("img_eq");
|
|
|
|
|
|
|
|
// Test textual equation
|
|
|
|
testThis("txt_eq");
|
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
2009-09-23 07:21:47 -07:00
|
|
|
addA11yLoadEvent(doTest);
|
2008-10-31 05:19:28 -07:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=428479">Mozilla Bug 428479</a>
|
|
|
|
<p id="display"></p>
|
|
|
|
<div id="content" style="display: none"></div>
|
|
|
|
<pre id="test">
|
|
|
|
</pre>
|
|
|
|
<p>Image:
|
|
|
|
<img id="img_eq" role="math" src="foo" alt="x^2 + y^2 + z^2">
|
|
|
|
</p>
|
|
|
|
<p>Text:
|
|
|
|
<span id="txt_eq" role="math" title="x^2 + y^2 + z^2">x<sup>2</sup> +
|
|
|
|
y<sup>2</sup> + z<sup>2</sup></span>
|
|
|
|
</p>
|
|
|
|
</body>
|
|
|
|
</html>
|