forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 2
/
test_aria_role_equation.html
57 lines (49 loc) · 1.45 KB
/
test_aria_role_equation.html
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
<!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/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="common.js"></script>
<script type="application/javascript"
src="role.js"></script>
<script type="application/javascript">
function testThis(aID)
{
getRole(aID, ROLE_FLAT_EQUATION);
var eqAcc = getAccessible(aID);
if (eqAcc)
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();
addA11yLoadEvent(doTest);
</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>