1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../resources/js-test.js"></script>
7 <div role=
"textbox" aria-readonly=
"false" aria-multiline=
"false" id=
"ariaTextBox" tabindex=
"0"></div>
8 <div role=
"textbox" aria-readonly=
"true" id=
"ariaReadOnlyAriaTextBox" tabindex=
"0"></div>
9 <input type=
"text" aria-readonly=
"true" id=
"ariaReadOnlyTextField" size=
20>
10 <input type=
"text" aria-readonly=
"false" id=
"ariaNonReadOnlyTextField" size=
20>
11 <input type=
"text" readonly=
"readonly" id=
"htmlReadOnlyTextField" size=
20>
12 <input type=
"text" id=
"textField" size=
20>
13 <textarea rows=
"2" cols=
"20" readonly=
"readonly" id=
"htmlReadOnlyTextArea"></textarea>
14 <textarea rows=
"2" cols=
"20" id=
"textArea"></textarea>
15 <p id=
"description"></p>
16 <div id=
"console"></div>
20 description("This tests that the AXValue property is correctly reported for native and non-native text boxes.");
22 if (window
.accessibilityController
) {
23 document
.getElementById("ariaTextBox").focus();
24 var ariaTextBox
= accessibilityController
.focusedElement
;
25 var ariaTextBoxIsWritable
= ariaTextBox
.isAttributeSettable("AXValue");
26 shouldBe("ariaTextBoxIsWritable", "true");
28 document
.getElementById("ariaReadOnlyAriaTextBox").focus();
29 var ariaReadOnlyAriaTextBox
= accessibilityController
.focusedElement
;
30 var ariaReadOnlyAriaTextBoxIsWritable
= ariaReadOnlyAriaTextBox
.isAttributeSettable("AXValue");
31 shouldBe("ariaReadOnlyAriaTextBoxIsWritable", "false");
33 document
.getElementById("ariaReadOnlyTextField").focus();
34 var ariaReadOnlyTextField
= accessibilityController
.focusedElement
;
35 var ariaReadOnlyTextFieldIsWritable
= ariaReadOnlyTextField
.isAttributeSettable("AXValue");
36 shouldBe("ariaReadOnlyTextFieldIsWritable", "false");
38 document
.getElementById("ariaNonReadOnlyTextField").focus();
39 var ariaNonReadOnlyTextField
= accessibilityController
.focusedElement
;
40 var ariaNonReadOnlyTextFieldIsWritable
= ariaNonReadOnlyTextField
.isAttributeSettable("AXValue");
41 shouldBe("ariaNonReadOnlyTextFieldIsWritable", "true");
43 document
.getElementById("htmlReadOnlyTextField").focus();
44 var htmlReadOnlyTextField
= accessibilityController
.focusedElement
;
45 var htmlReadOnlyTextFieldIsWritable
= htmlReadOnlyTextField
.isAttributeSettable("AXValue");
46 shouldBe("htmlReadOnlyTextFieldIsWritable", "false");
48 document
.getElementById("textField").focus();
49 var textField
= accessibilityController
.focusedElement
;
50 var textFieldIsWritable
= textField
.isAttributeSettable("AXValue");
51 shouldBe("textFieldIsWritable", "true");
53 document
.getElementById("htmlReadOnlyTextArea").focus();
54 var htmlReadOnlyTextArea
= accessibilityController
.focusedElement
;
55 var htmlReadOnlyTextAreaIsWritable
= htmlReadOnlyTextArea
.isAttributeSettable("AXValue");
56 shouldBe("htmlReadOnlyTextAreaIsWritable", "false");
58 document
.getElementById("textArea").focus();
59 var textArea
= accessibilityController
.focusedElement
;
60 var textAreaIsWritable
= textArea
.isAttributeSettable("AXValue");
61 shouldBe("textAreaIsWritable", "true");