summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/accessibility/aria-slider-value.html
blob: 7023da6a0aa45e748d9c19d7f521bd48418881cf (plain)
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
<html>
<body>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();

    function checkValue() {
        if (!window.accessibilityController)
            return;
        
        var aria = document.getElementById("slider");
        aria.focus();
        var focusedElement = accessibilityController.focusedElement;
        var value = focusedElement.intValue;
        var minValue = focusedElement.minValue;
        var maxValue = focusedElement.maxValue;
       
        var result = document.getElementById("result");
        if (value == 5 && minValue == 0 && maxValue == 10)
            result.innerText = "This test PASSES in DumpRenderTree. The value is " + value + ", the minValue is " 
                + minValue + ", and the max value is " + maxValue + ".";
        else
            result.innerText = "This test FAILS in DumpRenderTree. The value, minValue, and/or maxValue of the range must be incorrect.";
    }
</script>

<div>
    <p>In accessibility, the following should be a progress indicator:</p>
    <p><span tabindex="0" role="slider" id="slider" aria-valuenow=5 aria-valuemin=0 aria-valuemax=10>X</span></p>
    <span id="result"></span>
    <script>
        checkValue();
    </script>
  </div>
  
 </body>
</html>