зеркало из https://github.com/mozilla/gecko-dev.git
69 строки
2.7 KiB
HTML
69 строки
2.7 KiB
HTML
<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);
|
|
}
|
|
|
|
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>
|
|
</body>
|
|
|
|
</html>
|