| Index: third_party/WebKit/LayoutTests/accessibility/description-calc-inputs.html
|
| diff --git a/third_party/WebKit/LayoutTests/accessibility/description-calc-inputs.html b/third_party/WebKit/LayoutTests/accessibility/description-calc-inputs.html
|
| index 44c70e28f2cfe6935f2aad5108643afa8b3bdb0c..627ddcb444f1f0881974cd4fe483ddb30a2743c2 100644
|
| --- a/third_party/WebKit/LayoutTests/accessibility/description-calc-inputs.html
|
| +++ b/third_party/WebKit/LayoutTests/accessibility/description-calc-inputs.html
|
| @@ -23,6 +23,34 @@ test(function(t) {
|
| </script>
|
|
|
| <div class="container">
|
| + <input id="text1a" type="text" aria-placeholder="ARIA Placeholder">
|
| +</div>
|
| +
|
| +<script>
|
| +test(function(t) {
|
| + var axTextInput1a = accessibilityController.accessibleElementById("text1a");
|
| + assert_equals(axTextInput1a.name, "ARIA Placeholder");
|
| + assert_equals(axTextInput1a.nameFrom, "placeholder");
|
| + assert_equals(axTextInput1a.description, "");
|
| + assert_equals(axTextInput1a.descriptionFrom, "");
|
| +}, "Text input uses ARIA placeholder as accessible name if that's the only accessible text.");
|
| +</script>
|
| +
|
| +<div class="container">
|
| + <input id="text1b" type="text" aria-placeholder="ARIA Placeholder" placeholder="Placeholder">
|
| +</div>
|
| +
|
| +<script>
|
| +test(function(t) {
|
| + var axTextInput1b = accessibilityController.accessibleElementById("text1b");
|
| + assert_equals(axTextInput1b.name, "Placeholder");
|
| + assert_equals(axTextInput1b.nameFrom, "placeholder");
|
| + assert_equals(axTextInput1b.description, "");
|
| + assert_equals(axTextInput1b.descriptionFrom, "");
|
| +}, "Text input uses placeholder in preference to ARIA placeholder for accessible name.");
|
| +</script>
|
| +
|
| +<div class="container">
|
| <input id="text2" type="text" aria-label="Label" placeholder="Placeholder">
|
| </div>
|
|
|
| @@ -37,6 +65,34 @@ test(function(t) {
|
| </script>
|
|
|
| <div class="container">
|
| + <input id="text2a" type="text" aria-label="Label" aria-placeholder="ARIA Placeholder">
|
| +</div>
|
| +
|
| +<script>
|
| +test(function(t) {
|
| + var axTextInput2 = accessibilityController.accessibleElementById("text2a");
|
| + assert_equals(axTextInput2.name, "Label");
|
| + assert_equals(axTextInput2.nameFrom, "attribute");
|
| + assert_equals(axTextInput2.description, "ARIA Placeholder");
|
| + assert_equals(axTextInput2.descriptionFrom, "placeholder");
|
| +}, "Text input uses aria-placeholder as accessible description if it wasn't used as the accessible name.");
|
| +</script>
|
| +
|
| +<div class="container">
|
| + <input id="text2b" type="text" aria-label="Label" aria-placeholder="ARIA Placeholder" placeholder="Placeholder">
|
| +</div>
|
| +
|
| +<script>
|
| +test(function(t) {
|
| + var axTextInput2 = accessibilityController.accessibleElementById("text2b");
|
| + assert_equals(axTextInput2.name, "Label");
|
| + assert_equals(axTextInput2.nameFrom, "attribute");
|
| + assert_equals(axTextInput2.description, "Placeholder");
|
| + assert_equals(axTextInput2.descriptionFrom, "placeholder");
|
| +}, "Text input uses placeholder in preference to ARIA placeholder for accessible description.");
|
| +</script>
|
| +
|
| +<div class="container">
|
| <input id="text3" type="text" aria-label="Label" placeholder="Placeholder" aria-describedby="describedby3">
|
| <div id="describedby3">DescribedBy</div>
|
| </div>
|
|
|