[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
[email protected] | efb08634 | 2013-11-05 00:56:21 | [diff] [blame] | 4 | <script src="../resources/js-test.js"></script> |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 5 | </head> |
| 6 | <body id="body"> |
[email protected] | c1e0399 | 2011-08-04 06:35:56 | [diff] [blame] | 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> |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 15 | <p id="description"></p> |
| 16 | <div id="console"></div> |
| 17 | |
| 18 | <script> |
| 19 | |
[email protected] | c1e0399 | 2011-08-04 06:35:56 | [diff] [blame] | 20 | description("This tests that the AXValue property is correctly reported for native and non-native text boxes."); |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 21 | |
| 22 | if (window.accessibilityController) { |
[email protected] | c1e0399 | 2011-08-04 06:35:56 | [diff] [blame] | 23 | document.getElementById("ariaTextBox").focus(); |
| 24 | var ariaTextBox = accessibilityController.focusedElement; |
| 25 | var ariaTextBoxIsWritable = ariaTextBox.isAttributeSettable("AXValue"); |
| 26 | shouldBe("ariaTextBoxIsWritable", "true"); |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 27 | |
[email protected] | c1e0399 | 2011-08-04 06:35:56 | [diff] [blame] | 28 | document.getElementById("ariaReadOnlyAriaTextBox").focus(); |
| 29 | var ariaReadOnlyAriaTextBox = accessibilityController.focusedElement; |
| 30 | var ariaReadOnlyAriaTextBoxIsWritable = ariaReadOnlyAriaTextBox.isAttributeSettable("AXValue"); |
| 31 | shouldBe("ariaReadOnlyAriaTextBoxIsWritable", "false"); |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 32 | |
[email protected] | c1e0399 | 2011-08-04 06:35:56 | [diff] [blame] | 33 | document.getElementById("ariaReadOnlyTextField").focus(); |
| 34 | var ariaReadOnlyTextField = accessibilityController.focusedElement; |
| 35 | var ariaReadOnlyTextFieldIsWritable = ariaReadOnlyTextField.isAttributeSettable("AXValue"); |
| 36 | shouldBe("ariaReadOnlyTextFieldIsWritable", "false"); |
[email protected] | ee438347 | 2009-09-02 05:03:56 | [diff] [blame] | 37 | |
[email protected] | c1e0399 | 2011-08-04 06:35:56 | [diff] [blame] | 38 | document.getElementById("ariaNonReadOnlyTextField").focus(); |
| 39 | var ariaNonReadOnlyTextField = accessibilityController.focusedElement; |
| 40 | var ariaNonReadOnlyTextFieldIsWritable = ariaNonReadOnlyTextField.isAttributeSettable("AXValue"); |
| 41 | shouldBe("ariaNonReadOnlyTextFieldIsWritable", "true"); |
| 42 | |
| 43 | document.getElementById("htmlReadOnlyTextField").focus(); |
| 44 | var htmlReadOnlyTextField = accessibilityController.focusedElement; |
| 45 | var htmlReadOnlyTextFieldIsWritable = htmlReadOnlyTextField.isAttributeSettable("AXValue"); |
| 46 | shouldBe("htmlReadOnlyTextFieldIsWritable", "false"); |
| 47 | |
| 48 | document.getElementById("textField").focus(); |
| 49 | var textField = accessibilityController.focusedElement; |
| 50 | var textFieldIsWritable = textField.isAttributeSettable("AXValue"); |
| 51 | shouldBe("textFieldIsWritable", "true"); |
| 52 | |
| 53 | document.getElementById("htmlReadOnlyTextArea").focus(); |
| 54 | var htmlReadOnlyTextArea = accessibilityController.focusedElement; |
| 55 | var htmlReadOnlyTextAreaIsWritable = htmlReadOnlyTextArea.isAttributeSettable("AXValue"); |
| 56 | shouldBe("htmlReadOnlyTextAreaIsWritable", "false"); |
| 57 | |
| 58 | document.getElementById("textArea").focus(); |
| 59 | var textArea = accessibilityController.focusedElement; |
| 60 | var textAreaIsWritable = textArea.isAttributeSettable("AXValue"); |
| 61 | shouldBe("textAreaIsWritable", "true"); |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 62 | } |
| 63 | |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 64 | </script> |
| 65 | |
[email protected] | dd8b1c9 | 2009-06-27 00:07:11 | [diff] [blame] | 66 | </body> |
| 67 | </html> |