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
|
<html>
<head>
<title>nsIAccessible value testing for implicit aria-value* attributes</title>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="../common.js"></script>
<script type="application/javascript" src="../value.js"></script>
<script src="chrome://mochikit/content/chrome-harness.js"></script>
<script type="application/javascript">
function doTest() {
for (const role of ["slider", "scrollbar"]) {
testValue(`${role}_default`, "50", 50, 0, 100, 0);
testValue(`${role}_min1max50`, "25.5", 25.5, 1, 50, 0);
testValue(`${role}_max200`, "100", 100, 0, 200, 0);
testValue(`${role}_min10`, "55", 55, 10, 100, 0);
testValue(`${role}_vt`, "juice", 50, 0, 100, 0);
testValue(`${role}_vn`, "6", 6, 0, 100, 0);
testValue(`${role}_vtvn`, "juice", 6, 0, 100, 0);
}
testValue("spinbutton_default", "", 0, 0, 0, 0);
testValue("spinbutton_min1max50", "", 0, 1, 50, 0);
testValue("spinbutton_max200", "", 0, 0, 200, 0);
testValue("spinbutton_min10", "", 0, 10, 0, 0);
testValue("spinbutton_vt", "juice", 0, 0, 0, 0);
testValue("spinbutton_vn", "6", 6, 0, 0, 0);
testValue("spinbutton_vtvn", "juice", 6, 0, 0, 0);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1357071"
title="Add support for implicit values for aria-value* attributes for scrollbar and slider roles">
Bug 1357071
</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
<!-- ARIA sliders -->
<div id="slider_default" role="slider">vanilla slider</div>
<div id="slider_min1max50" role="slider" aria-valuemin="1" aria-valuemax="50">banana slider</div>
<div id="slider_max200" role="slider" aria-valuemax="200">cherry slider</div>
<div id="slider_min10" role="slider" aria-valuemin="10">strawberry slider</div>
<div id="slider_vt" role="slider" aria-valuetext="juice">orange slider</div>
<div id="slider_vn" role="slider" aria-valuenow="6">chocolate slider</div>
<div id="slider_vtvn" role="slider" aria-valuetext="juice" aria-valuenow="6">apple slider</div>
<!-- ARIA scrollbars -->
<div id="scrollbar_default" role="scrollbar">vanilla scrollbar</div>
<div id="scrollbar_min1max50" role="scrollbar" aria-valuemin="1" aria-valuemax="50">banana scrollbar</div>
<div id="scrollbar_max200" role="scrollbar" aria-valuemax="200">cherry scrollbar</div>
<div id="scrollbar_min10" role="scrollbar" aria-valuemin="10">strawberry scrollbar</div>
<div id="scrollbar_vt" role="scrollbar" aria-valuetext="juice">orange scrollbar</div>
<div id="scrollbar_vn" role="scrollbar" aria-valuenow="6">chocolate scrollbar</div>
<div id="scrollbar_vtvn" role="scrollbar" aria-valuetext="juice" aria-valuenow="6">apple scrollbar</div>
<!-- ARIA spinbuttons -->
<div id="spinbutton_default" role="spinbutton">vanilla spinbutton</div>
<div id="spinbutton_min1max50" role="spinbutton" aria-valuemin="1" aria-valuemax="50">banana spinbutton</div>
<div id="spinbutton_max200" role="spinbutton" aria-valuemax="200">cherry spinbutton</div>
<div id="spinbutton_min10" role="spinbutton" aria-valuemin="10">strawberry spinbutton</div>
<div id="spinbutton_vt" role="spinbutton" aria-valuetext="juice">orange spinbutton</div>
<div id="spinbutton_vn" role="spinbutton" aria-valuenow="6">chocolate spinbutton</div>
<div id="spinbutton_vtvn" role="spinbutton" aria-valuetext="juice" aria-valuenow="6">apple spinbutton</div>
</body>
</html>
|