4 <script src=
"../../../resources/js-test.js"></script>
5 <script src=
"../resources/multiple-fields-ax-aria-attributes.js"></script>
8 <input id=
"test" type=
"date">
10 description('This test checks aria-help attribute of fields in multiple fields date input UI.');
12 var testInput
= document
.getElementById('test');
14 if (!window
.accessibilityController
|| !window
.eventSender
)
15 debug('Please run inside DRT or WTR.');
18 debug('Initial empty state');
19 checkFocusedElementAXAttributes('AXHelp: Month, AXValueDescription: blank, intValue:0, range:1-12');
20 eventSender
.keyDown('\t');
21 checkFocusedElementAXAttributes('AXHelp: Day, AXValueDescription: blank, intValue:0, range:1-31');
22 eventSender
.keyDown('\t');
23 checkFocusedElementAXAttributes('AXHelp: Year, AXValueDescription: blank, intValue:0, range:1-275760');
25 eventSender
.keyDown('\t', ['shiftKey']);
26 eventSender
.keyDown('\t', ['shiftKey']);
27 debug('Non-empty value');
28 testInput
.value
= "2012-10-09";
29 checkFocusedElementAXAttributes('AXHelp: Month, AXValueDescription: 10, intValue:10, range:1-12');
30 eventSender
.keyDown('\t');
31 checkFocusedElementAXAttributes('AXHelp: Day, AXValueDescription: 09, intValue:9, range:1-31');
32 eventSender
.keyDown('\t');
33 checkFocusedElementAXAttributes('AXHelp: Year, AXValueDescription: 2012, intValue:2012, range:1-275760');
36 eventSender
.keyDown('\b');
37 checkFocusedElementAXAttributes('AXHelp: Year, AXValueDescription: blank, intValue:0, range:1-275760');
38 eventSender
.keyDown('\t', ['shiftKey']);
39 eventSender
.keyDown('\b');
40 checkFocusedElementAXAttributes('AXHelp: Day, AXValueDescription: blank, intValue:0, range:1-31');
41 eventSender
.keyDown('\t', ['shiftKey']);
42 eventSender
.keyDown('\b');
43 checkFocusedElementAXAttributes('AXHelp: Month, AXValueDescription: blank, intValue:0, range:1-12');
46 testInput
.parentNode
.removeChild(testInput
);