Changeset 201216 in webkit
- Timestamp:
- May 20, 2016 11:34:14 AM (8 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 19 deleted
- 60 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201204 r201216 1 2016-05-20 Joanmarie Diggs <jdiggs@igalia.com> 2 3 AX: Layout tests related to text alternative computation need to be done differently 4 https://bugs.webkit.org/show_bug.cgi?id=157187 5 6 Create several utility methods to facilitate retrieval of platform-independent 7 attribute values from platform-specific attributes: 8 9 - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a 10 specific piece of text alternative information, stripping off the platform 11 attribute name by default. These methods should make it possible to share tests 12 and expectations files because the text alternative calculation defined by the 13 W3C accessibility specifications should be the same for all platforms. (The 14 differences are the result of the unique platform mappings.) 15 16 - platformTextAlternatives() to dump out all the text alternative attributes and 17 values, preserving the platform-specific attribute name. This, along with the 18 use of the platformValue* methods with attribute name enabled, should make it 19 possible to have shared tests with platform-specific expectations without the 20 need to check the platform in the test itself. 21 22 - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the 23 need for platform-specific expectations files simply because such an element 24 happens to be included in the test file and verifying that element's role is 25 desired. 26 27 Begin using these methods in the tests related to text alternative computation 28 which had platform-specific checks, update the expectations files when needed, 29 and remove now-obsolete platform-specific expectations files. 30 31 Reviewed by Chris Fleizach. 32 33 * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. 34 * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. 35 * accessibility/aria-help-expected.txt: Added. 36 * accessibility/aria-help.html: Updated. 37 * accessibility/aria-label-expected.txt: Updated. 38 * accessibility/aria-label.html: Updated. 39 * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. 40 * accessibility/aria-labeled-with-hidden-node.html: Updated. 41 * accessibility/aria-labelledby-on-input-expected.txt: Updated. 42 * accessibility/aria-labelledby-on-input.html: Updated. 43 * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. 44 * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. 45 * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. 46 * accessibility/aria-labelledby-overrides-label.html: Updated. 47 * accessibility/aria-labelledby-stay-within-expected.txt: Updated. 48 * accessibility/aria-labelledby-stay-within.html: Updated. 49 * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. 50 * accessibility/aria-labelledby-with-descendants.html: Updated. 51 * accessibility/aria-namefrom-author-expected.txt: Updated. 52 * accessibility/aria-namefrom-author.html: Updated. 53 * accessibility/aria-text-role-expected.txt: Updated. 54 * accessibility/aria-text-role.html: Updated. 55 * accessibility/canvas-description-and-role-expected.txt: Updated. 56 * accessibility/canvas-description-and-role.html: Updated. 57 * accessibility/canvas-fallback-content.html: Updated. 58 * accessibility/empty-image-with-title-expected.txt: Updated. 59 * accessibility/empty-image-with-title.html: Updated. 60 * accessibility/fieldset-element-expected.txt: Updated. 61 * accessibility/fieldset-element.html: Updated. 62 * accessibility/focusable-div-expected.txt: Updated. 63 * accessibility/focusable-div.html: Updated. 64 * accessibility/help-text.html: Updated. 65 * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. 66 * accessibility/img-alt-tag-only-whitespace.html: Updated. 67 * accessibility/img-aria-button-alt-tag-expected.txt: Updated. 68 * accessibility/img-aria-button-alt-tag.html: Updated. 69 * accessibility/img-fallsback-to-title.html: Updated. 70 * accessibility/input-image-alt-expected.txt: Updated. 71 * accessibility/input-image-alt.html: Updated. 72 * accessibility/loading-iframe-sends-notification.html: Updated. 73 * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. 74 * accessibility/self-referencing-aria-labelledby.html: Updated. 75 * accessibility/svg-bounds.html: Updated. 76 * accessibility/svg-group-element-with-title-expected.txt: Updated. 77 * accessibility/svg-group-element-with-title.html: Updated. 78 * accessibility/svg-image-expected.txt: Updated. 79 * accessibility/svg-image.html: Updated. 80 * accessibility/svg-labelledby-expected.txt: Updated. 81 * accessibility/svg-labelledby.html: Updated. 82 * accessibility/svg-remote-element.html: Updated. 83 * accessibility/w3c-svg-description-calculation.html: Updated. 84 * accessibility/w3c-svg-name-calculation.html: Updated. 85 * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. 86 * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. 87 * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. 88 * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. 89 * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. 90 * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. 91 * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. 92 * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. 93 * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. 94 * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. 95 * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. 96 * platform/gtk/accessibility/focusable-div-expected.txt: Removed. 97 * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. 98 * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. 99 * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. 100 * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. 101 * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. 102 * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. 103 * platform/gtk/accessibility/svg-image-expected.txt: Removed. 104 * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. 105 * platform/mac/accessibility/aria-help-expected.txt: Removed. 106 * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. 107 * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. 108 * platform/mac/accessibility/fieldset-element-expected.txt: Removed. 109 * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. 110 * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. 111 * resources/accessibility-helper.js: 112 (platformValueForW3CName): Added. 113 (platformValueForW3CDescription): Added. 114 (platformTextAlternatives): Added. 115 (platformRoleForComboBox): Added. 116 (platformRoleForStaticText): Added. 117 1 118 2016-05-19 Myles C. Maxfield <mmaxfield@apple.com> 2 119 -
trunk/LayoutTests/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt
r160311 r201216 1 1 2 This tests th at setting a role on an img still allows the alt attribute to be used for the description..2 This tests the alternative text calculation when setting a role on an img with an alt attribute. 3 3 4 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". … … 6 6 7 7 PASS text.stringValue is 'AXValue: TEST1' 8 PASS group.description is 'AXDescription: TEST2'9 PASS button.description is 'AXDescription: TEST3'8 PASS platformValueForW3CName(group) is "TEST2" 9 PASS platformValueForW3CName(button) is "TEST3" 10 10 PASS successfullyParsed is true 11 11 -
trunk/LayoutTests/accessibility/alt-tag-on-image-with-nonimage-role.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 17 18 <script> 18 19 19 description("This tests th at setting a role on an img still allows the alt attribute to be used for the description..");20 description("This tests the alternative text calculation when setting a role on an img with an alt attribute."); 20 21 21 22 if (window.accessibilityController) { … … 27 28 var button = accessibilityController.accessibleElementById("button"); 28 29 29 if (accessibilityController.platformName == "atk") { 30 shouldBe("group.title", "'AXTitle: TEST2'"); 31 shouldBe("button.title", "'AXTitle: TEST3'"); 32 } else { 33 shouldBe("group.description", "'AXDescription: TEST2'"); 34 shouldBe("button.description", "'AXDescription: TEST3'"); 35 } 30 shouldBeEqualToString("platformValueForW3CName(group)", "TEST2"); 31 shouldBeEqualToString("platformValueForW3CName(button)", "TEST3"); 36 32 } 37 33 -
trunk/LayoutTests/accessibility/aria-help-expected.txt
r201215 r201216 1 button2 1 This tests that aria-help attribute works as expected. 3 2 … … 5 4 6 5 7 PASS button.description is 'AXDescription: click here' 6 PASS platformValueForW3CName(axButton) is "title" 7 PASS platformValueForW3CDescription(axButton) is "click here" 8 8 PASS successfullyParsed is true 9 9 -
trunk/LayoutTests/accessibility/aria-help.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> 7 8 <div id="content"> 8 9 <div id="button" tabindex=0 role="button" aria-label="title" aria-help="click here"> 9 10 button 10 11 </div> 11 12 </div> 12 13 <p id="description"></p> 13 14 <div id="console"></div> … … 18 19 19 20 if (window.accessibilityController) { 21 document.getElementById("button").focus(); 22 var axButton = accessibilityController.focusedElement; 23 shouldBeEqualToString("platformValueForW3CName(axButton)", "title"); 24 shouldBeEqualToString("platformValueForW3CDescription(axButton)", "click here"); 20 25 21 document.getElementById("button").focus(); 22 var button = accessibilityController.focusedElement; 23 if (accessibilityController.platformName == "atk") 24 shouldBe("button.description", "'AXDescription: click here'"); 25 else 26 shouldBe("button.helpText", "'AXHelp: click here'"); 26 document.getElementById("content").style.visibility = "hidden"; 27 27 } 28 29 28 </script> 30 29 -
trunk/LayoutTests/accessibility/aria-label-expected.txt
r45456 r201216 1 test 2 This tests that the aria-label attribute works. The input and the A tag should return the appropriate description. 1 This tests that the aria-label attribute works on both an input and an anchor. 3 2 4 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 5 4 6 5 7 PASS succeeded is true8 PASS succeeded is true6 PASS platformValueForW3CName(axInput) is "aria label" 7 PASS platformValueForW3CName(axLink) is "aria link" 9 8 PASS successfullyParsed is true 10 9 -
trunk/LayoutTests/accessibility/aria-label.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> 8 <div id="content"> 7 9 <input aria-label="aria label" type="text" size=20> 8 10 <a href="#" aria-label="aria link">test</a> 11 </div> 9 12 <p id="description"></p> 10 13 <div id="console"></div> … … 12 15 <script> 13 16 14 description("This tests that the aria-label attribute works . The input and the A tag should return the appropriate description.");17 description("This tests that the aria-label attribute works on both an input and an anchor."); 15 18 16 19 if (window.accessibilityController) { … … 18 21 var body = document.getElementById("body"); 19 22 body.focus(); 20 var obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);21 var succeeded;22 if (accessibilityController.platformName == "atk")23 succeeded = obj.title == "AXTitle: aria label";24 else25 succeeded = obj.description == "AXDescription: aria label";26 shouldBe("succeeded", "true");27 23 28 obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1); 29 if (accessibilityController.platformName == "atk") 30 succeeded = obj.title == "AXTitle: aria link"; 31 else 32 succeeded = obj.description == "AXDescription: aria link"; 33 shouldBe("succeeded", "true"); 24 var axInput = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0); 25 shouldBeEqualToString("platformValueForW3CName(axInput)", "aria label"); 26 27 var axLink = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1); 28 shouldBeEqualToString("platformValueForW3CName(axLink)", "aria link"); 29 30 document.getElementById("content").style.visibility = "hidden"; 34 31 } 35 36 32 </script> 37 33 -
trunk/LayoutTests/accessibility/aria-labeled-with-hidden-node-expected.txt
r157221 r201216 1 Go2 1 This tests that if try to use a non-rendered node as your labelledby element, it won't crash and it will work. 3 2 … … 5 4 6 5 7 PASS button.description is 'AXDescription: TITLE'6 PASS platformValueForW3CName(button) is "TITLE" 8 7 PASS successfullyParsed is true 9 8 -
trunk/LayoutTests/accessibility/aria-labeled-with-hidden-node.html
r201072 r201216 4 4 <head> 5 5 <script src="../resources/js-test-pre.js"></script> 6 <script src="../resources/accessibility-helper.js"></script> 6 7 </head> 7 8 <body> 8 9 <div id="content"> 9 10 <button id="button" aria-labelledby="title">Go</button> 10 11 </div> 11 12 12 13 <p id="description"></p> … … 18 19 if (window.accessibilityController) { 19 20 var button = accessibilityController.accessibleElementById("button"); 20 if (accessibilityController.platformName == "atk") 21 shouldBe("button.title", "'AXTitle: TITLE'"); 22 else 23 shouldBe("button.description", "'AXDescription: TITLE'"); 21 shouldBeEqualToString("platformValueForW3CName(button)", "TITLE"); 22 23 document.getElementById("content").style.visibility = "hidden"; 24 24 } 25 25 </script> -
trunk/LayoutTests/accessibility/aria-labelledby-on-input-expected.txt
r114362 r201216 1 This computer will self-destruct in minutes.1 This verifies the accessible name of an input with multiple aria-labelledby elements. 2 2 3 The accessibility description is "AXDescription: This computer will self-destruct in 10 minutes." 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 PASS platformValueForW3CName(axInput) is "This computer will self-destruct in 10 minutes." 7 PASS successfullyParsed is true 8 9 TEST COMPLETE 10 -
trunk/LayoutTests/accessibility/aria-labelledby-on-input.html
r201072 r201216 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 2 <html> 2 < script>3 if (window.testRunner) 4 testRunner.dumpAsText(); 5 </ script>3 <head> 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 6 </head> 6 7 <body> 8 <div id="content"> 7 9 <span id="message">This computer will self-destruct in</span> 8 10 <input id="time" type="text" value="10" aria-labelledby="message time unit"/> 9 11 <span id="unit"> minutes.</span> 10 <div id="result"></div>11 12 13 if (window.accessibilityController) {14 var labeledItem = document.getElementById("time");15 labeledItem.focus();16 var result = document.getElementById("result");17 if (accessibilityController.platformName == "atk")18 result.innerText = "\nThe accessibility title is \"" + accessibilityController.focusedElement.title + "\""; 19 else20 result.innerText = "\nThe accessibility description is \"" + accessibilityController.focusedElement.description + "\"";21 } 22 12 </div> 13 <div id="console"></div> 14 <script> 15 description("This verifies the accessible name of an input with multiple aria-labelledby elements."); 16 if (window.accessibilityController) { 17 var labeledItem = document.getElementById("time").focus(); 18 var axInput = accessibilityController.focusedElement; 19 shouldBeEqualToString("platformValueForW3CName(axInput)", "This computer will self-destruct in 10 minutes."); 20 21 document.getElementById("content").style.visibility = "hidden"; 22 } 23 </script> 24 <script src="../resources/js-test-post.js"></script> 23 25 </body> 24 26 </html> -
trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt
r159482 r201216 4 4 5 5 6 PASS linkDescription is 'AXDescription: Y Z'6 PASS platformValueForW3CName(axLink) is "Y Z" 7 7 PASS successfullyParsed is true 8 8 -
trunk/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 <title>aria-labelledby Overrides aria-labeledby</title> 6 7 </head> … … 24 25 25 26 if (window.accessibilityController) { 26 if (accessibilityController.platformName == "atk") { 27 var linkTitle = accessibilityController.accessibleElementById("link").title; 28 shouldBe("linkTitle", "'AXTitle: Y Z'"); 29 } else { 30 var linkDescription = accessibilityController.accessibleElementById("link").description; 31 shouldBe("linkDescription", "'AXDescription: Y Z'"); 32 } 27 var axLink = accessibilityController.accessibleElementById("link"); 28 shouldBeEqualToString("platformValueForW3CName(axLink)", "Y Z"); 29 33 30 // Hide superfluous text. 34 31 document.getElementById("test").style.display = "none"; -
trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt
r151924 r201216 1 Shut down computer after minutes2 1 This tests that if aria-labelledby is used, then label elements are not used 3 2 … … 5 4 6 5 7 text.description is AXDescription: Shut down computer after 10 minutes 6 PASS platformValueForW3CName(text) is "Shut down computer after 10 minutes" 8 7 PASS text.titleUIElement() != null && text.titleUIElement().isValid is false 9 Label element role is: AXRole: AX Label8 Label element role is: AXRole: AXGroup 10 9 PASS successfullyParsed is true 11 10 -
trunk/LayoutTests/accessibility/aria-labelledby-overrides-label.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> 7 8 <div id="content"> 8 9 <span id="labelShutdown"><label id="labelElement" for="shutdownTime">Shut down computer after</label></span> 9 10 <input id="shutdownTime" type="text" value="10" aria-labelledby="labelShutdown shutdownTime shutdownUnit" /> 10 11 <span id="shutdownUnit">minutes</span> 11 12 </div> 12 13 <p id="description"></p> 13 14 <div id="console"></div> … … 22 23 text.focus(); 23 24 text = accessibilityController.focusedElement; 24 25 if (accessibilityController.platformName == "atk") 26 debug("text.title is " + text.title); 27 else 28 debug("text.description is " + text.description); 25 shouldBeEqualToString("platformValueForW3CName(text)", "Shut down computer after 10 minutes"); 29 26 30 27 // There should be no title UI element. … … 35 32 // it's a label element (sometimes they are ignored). 36 33 debug("Label element role is: " + labelElement.role); 34 35 document.getElementById("content").style.visibility = "hidden"; 37 36 } 38 37 -
trunk/LayoutTests/accessibility/aria-labelledby-stay-within-expected.txt
r114362 r201216 1 Some focusable content before the application widgets. 1 This tests that aria-labelledby does not append all sibling to an ARIA name 2 2 3 Get New Mail 4 Compose New Message 5 Reply 6 Reply All 7 Forward 8 Delete 9 Item Four 10 Item Five 11 Item Six 12 Item Seven 13 Passed 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 5 6 PASS platformValueForW3CName(axButton) is "Reply Item Five" 7 PASS successfullyParsed is true 8 9 TEST COMPLETE 10 -
trunk/LayoutTests/accessibility/aria-labelledby-stay-within.html
r201072 r201216 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 2 <html> 2 < script>3 if (window.testRunner) 4 testRunner.dumpAsText(); 5 </ script>3 <head> 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 6 </head> 6 7 <body> 7 8 <!-- this test makes sure that the labeled by aria attributes does not start climbing out of itself and 9 appending on other elements as its own description --> 10 8 <div id="content"> 11 9 <p>Some <a href="#">focusable content</a> before the application widgets.</p> 12 10 <ul role="toolbar"> … … 26 24 </ul> 27 25 28 <div id="result"></div> 29 30 <script> 26 </div> 27 <p id="description"></p> 28 <div id="console"></div> 29 <script> 30 description("This tests that aria-labelledby does not append all sibling to an ARIA name"); 31 31 32 if (window.accessibilityController) { 32 var labeledItem = document.getElementById("rep"); 33 labeledItem.focus(); 34 var result = document.getElementById("result"); 35 var resultValue; 36 if (accessibilityController.platformName == "atk") 37 resultValue = accessibilityController.focusedElement.title; 38 else 39 resultValue = accessibilityController.focusedElement.description; 40 if (resultValue.endsWith("Reply Item Five")) { 41 result.innerText = "Passed"; 42 } 43 else { 44 result.innerText = "Failed. Result ==" + resultValue + "=="; 45 } 33 var labeledItem = document.getElementById("rep").focus(); 34 var axButton = accessibilityController.focusedElement; 35 shouldBeEqualToString("platformValueForW3CName(axButton)", "Reply Item Five"); 36 37 document.getElementById("content").style.visibility = "hidden"; 46 38 } 47 </script> 39 </script> 40 <script src="../resources/js-test-post.js"></script> 48 41 </body> 49 42 </html> -
trunk/LayoutTests/accessibility/aria-labelledby-with-descendants-expected.txt
r174080 r201216 6 6 7 7 8 test 1: aria-labelledby description: AXDescription:hello link use world test1 test2 test38 test 1: aria-labelledby description: hello link use world test1 test2 test3 9 9 test 1: expected description: hello link use world test1 test2 test3 10 10 11 test 2: aria-labelledby description: AXDescription:foo bar11 test 2: aria-labelledby description: foo bar 12 12 test 2: expected description: foo bar 13 13 14 test 3: aria-labelledby description: AXDescription:foo bar14 test 3: aria-labelledby description: foo bar 15 15 test 3: expected description: foo bar 16 16 17 test 4: aria-labelledby description: AXDescription:foo17 test 4: aria-labelledby description: foo 18 18 test 4: expected description: foo 19 19 20 test 5: aria-labelledby description: AXDescription:Delete20 test 5: aria-labelledby description: Delete 21 21 test 5: expected description: Delete 22 22 23 test 6: aria-labelledby description: AXDescription:Delete product name23 test 6: aria-labelledby description: Delete product name 24 24 test 6: expected description: Delete product name 25 25 26 test 7: aria-labelledby description: AXDescription:foo bar baz bop bap boom26 test 7: aria-labelledby description: foo bar baz bop bap boom 27 27 test 7: expected description: foo bar baz bop bap boom 28 28 -
trunk/LayoutTests/accessibility/aria-labelledby-with-descendants.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 50 51 for (var k = 1; k < 8; k++) { 51 52 var test = accessibilityController.accessibleElementById("test" + k); 52 if (accessibilityController.platformName == "atk") 53 debug("test " + k + ": aria-labelledby description: " + test.title); 54 else 55 debug("test " + k + ": aria-labelledby description: " + test.description); 53 debug("test " + k + ": aria-labelledby description: " + platformValueForW3CName(test)); 56 54 debug("test " + k + ": expected description: " + document.getElementById("test" + k).getAttribute("data-label") + "\n"); 57 55 } -
trunk/LayoutTests/accessibility/aria-namefrom-author-expected.txt
r174074 r201216 1 This tests all the cases where nameFrom: author is used instead of nameFrom: contents. This means that if these elements are used in aria-labelledby they should not return their inner text. The button should retain its aria-label as the description.1 This tests all the cases where nameFrom: author is used instead of nameFrom: contents. This means that if these elements are used in aria-labelledby they should not return their inner text. The button should retain its aria-label. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 4 5 5 6 Button description: AXDescription: text 6 PASS buttonAccName == button.getAttribute('aria-label') is true 7 PASS buttonAccName != button.innerText is true 7 8 PASS successfullyParsed is true 8 9 -
trunk/LayoutTests/accessibility/aria-namefrom-author.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 59 60 <script> 60 61 61 description("This tests all the cases where nameFrom: author is used instead of nameFrom: contents. This means that if these elements are used in aria-labelledby they should not return their inner text. The button should retain its aria-label as the description.");62 description("This tests all the cases where nameFrom: author is used instead of nameFrom: contents. This means that if these elements are used in aria-labelledby they should not return their inner text. The button should retain its aria-label."); 62 63 63 64 var labelledby = ""; … … 68 69 69 70 if (window.accessibilityController) { 70 if (accessibilityController.platformName == "atk") 71 debug("Button title: " + accessibilityController.accessibleElementById("button").title); 72 else 73 debug("Button description: " + accessibilityController.accessibleElementById("button").description); 71 var buttonAccName = platformValueForW3CName(accessibilityController.accessibleElementById("button")); 72 var button = document.getElementById("button"); 73 shouldBeTrue("buttonAccName == button.getAttribute('aria-label')"); 74 shouldBeTrue("buttonAccName != button.innerText"); 75 74 76 document.getElementById("content").style.visibility = "hidden"; 75 77 } -
trunk/LayoutTests/accessibility/aria-text-role-expected.txt
r51576 r201216 5 5 6 6 7 PASS textrole.role is 'AXRole: AXStaticText'7 PASS textrole.role is platformRoleForStaticText(textrole) 8 8 PASS textrole.stringValue is 'AXValue: all at once' 9 9 PASS textrole.elementAtPoint(x, y).isEqual(textrole) is true -
trunk/LayoutTests/accessibility/aria-text-role.html
r200240 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 23 24 document.getElementById("textrole").focus(); 24 25 var textrole = accessibilityController.focusedElement; 25 if (accessibilityController.platformName == "atk") 26 shouldBe("textrole.role", "'AXRole: AXStatic'"); 27 else 28 shouldBe("textrole.role", "'AXRole: AXStaticText'"); 26 shouldBe("textrole.role", "platformRoleForStaticText(textrole)"); 29 27 shouldBe("textrole.stringValue", "'AXValue: all at once'"); 30 28 -
trunk/LayoutTests/accessibility/canvas-description-and-role-expected.txt
r158810 r201216 5 5 6 6 PASS axContainer.childrenCount is 2 7 Canvas 1 description: AXDescription: Canvas label 7 PASS platformValueForW3CName(axCanvas1) is "Canvas label" 8 8 Canvas 1 role: AXRole: AXCanvas 9 Canvas 2 description: AXDescription: 9 PASS platformValueForW3CName(axCanvas2) is "" 10 10 Canvas 2 role: AXRole: AXCanvas 11 11 PASS successfullyParsed is true -
trunk/LayoutTests/accessibility/canvas-description-and-role.html
r201072 r201216 3 3 <body> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 6 7 <style>canvas { display: inline; border: 1px solid #000; }</style> … … 22 23 23 24 var axCanvas1 = axContainer.childAtIndex(0); 24 if (accessibilityController.platformName == "atk") 25 debug('Canvas 1 title: ' + axCanvas1.title); 26 else 27 debug('Canvas 1 description: ' + axCanvas1.description); 25 shouldBeEqualToString("platformValueForW3CName(axCanvas1)", "Canvas label"); 28 26 debug('Canvas 1 role: ' + axCanvas1.role); 29 27 30 28 var axCanvas2 = axContainer.childAtIndex(1); 31 if (accessibilityController.platformName == "atk") 32 debug('Canvas 2 title: ' + axCanvas2.title); 33 else 34 debug('Canvas 2 description: ' + axCanvas2.description); 29 shouldBeEqualToString("platformValueForW3CName(axCanvas2)", ""); 35 30 debug('Canvas 2 role: ' + axCanvas2.role); 36 31 } -
trunk/LayoutTests/accessibility/canvas-fallback-content.html
r161666 r201216 3 3 <body> 4 4 <script src="../resources/js-test-pre.js"></script> 5 5 <script src="../resources/accessibility-helper.js"></script> 6 6 <style> 7 7 myelement { … … 53 53 } 54 54 55 var comboBoxRole = accessibilityController.platformName == "atk" ? "AXRole: AXComboBox" : "AXRole: AXPopUpButton";55 var comboBoxRole = platformRoleForComboBox(accessibilityController.platformName); 56 56 57 57 // Check rendered controls. -
trunk/LayoutTests/accessibility/empty-image-with-title-expected.txt
r151924 r201216 6 6 7 7 image1.role is AXRole: AXImage 8 image1 .descriptionis AXDescription: baz8 image1's accessible name with source is AXDescription: baz 9 9 PASS successfullyParsed is true 10 10 -
trunk/LayoutTests/accessibility/empty-image-with-title.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> 7 8 8 9 <img id="image1" src="foo.gif" title="baz" width="100" height="100"> 9 10 10 <div id="console"></div> 11 11 … … 18 18 var image1 = accessibilityController.accessibleElementById("image1"); 19 19 debug("image1.role is " + image1.role); 20 if (accessibilityController.platformName == "atk") 21 debug("image1.title is " + image1.title); 22 else 23 debug("image1.description is " + image1.description); 20 21 var accNameWithSource = platformValueForW3CName(image1, true); 22 debug("image1's accessible name with source is " + accNameWithSource); 24 23 } 25 24 -
trunk/LayoutTests/accessibility/fieldset-element-expected.txt
r178471 r201216 1 Name:2 High Score:3 Name:4 High Score:5 Name:6 High Score:7 Name:8 High Score:9 Name:10 High Score: Name:11 Name:12 Other:13 1 This tests that fieldset and legend elements are exposed correctly. 14 2 … … 16 4 17 5 18 AXDescription: High Score:19 AXDescription: High Score:20 AXDescription: New High Score:21 AXDescription: New High Score:22 AXDescription:23 AXDescription: High Score:24 AXDescription:25 6 element id 'f0': High Score: 7 element id 'f1': High Score: 8 element id 'f2': New High Score: 9 element id 'f3': New High Score: 10 element id 'f4': 11 element id 'f5': High Score: 12 element id 'f6': 13 element id 'l0': AXValue: Other: 26 14 PASS successfullyParsed is true 27 15 -
trunk/LayoutTests/accessibility/fieldset-element.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 <title>Fieldset Element</title> 6 7 </head> 7 8 <body> 8 9 <div id="content"> 9 10 <form> 10 11 <!-- fieldset with aria-label. --> … … 64 65 <!-- legend outside fieldset. --> 65 66 <legend id="l0">Other:</legend> 66 67 </div> 67 68 <p id="description"></p> 68 69 <div id="console"></div> … … 79 80 fieldsetTestCount = document.getElementsByClassName("fieldsetTest").length; 80 81 for (var i = 0; i < fieldsetTestCount; ++i) { 81 if (accessibilityController.platformName == "atk") 82 fieldsetDescription = accessibilityController.accessibleElementById("f" + i).title; 83 else 84 fieldsetDescription = accessibilityController.accessibleElementById("f" + i).description; 85 debug(fieldsetDescription); 82 var accName = platformValueForW3CName(accessibilityController.accessibleElementById("f" + i)); 83 debug("element id 'f" + i + "': " + accName); 86 84 } 87 85 88 86 // legend tests. 89 legendValue = accessibilityController.accessibleElementById("l0").childAtIndex(0).stringValue; 90 debug(legendValue); 87 var legend = accessibilityController.accessibleElementById("l0"); 88 if (legend.childrenCount) 89 legend = legend.childAtIndex(0); 90 debug("element id 'l0': " + legend.stringValue); 91 92 document.getElementById("content").style.visibility = "hidden"; 91 93 } 92 94 </script> -
trunk/LayoutTests/accessibility/focusable-div-expected.txt
r162576 r201216 1 A2 B3 C4 Link5 Initial text before linkLink6 List item7 Initial text before list8 List item9 1 This test makes sure that a generic focusable div can get accessibility focus. It should not get accessible text from its children automatically though. 10 2 … … 19 11 PASS lastChar(axDiv2.title) is ' ' 20 12 PASS document.activeElement == div3 is true 21 PASS lastChar(a xDiv3.description) is "D"13 PASS lastChar(accNameForDiv3) is "D" 22 14 PASS document.activeElement == div4 is true 23 15 PASS axDiv4.title.indexOf('Link') is -1 -
trunk/LayoutTests/accessibility/focusable-div.html
r201072 r201216 3 3 <body> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 6 7 <div id="content"> 5 8 6 9 <!-- A link always gets its accessible text from contents. --> … … 17 20 <div id="div6" tabindex="0"><ul><li>List item</li></ul></div> 18 21 <div id="div7" tabindex="0">Initial text before list<ul><li>List item</li></ul></div> 19 22 </div> 20 23 <div id="console"></div> 21 24 <script> … … 51 54 shouldBe("document.activeElement == div3", "true"); 52 55 window.axDiv3 = accessibilityController.focusedElement; 53 if (accessibilityController.platformName == "atk") 54 shouldBe("lastChar(axDiv3.title)", "\"D\""); 55 else 56 shouldBe("lastChar(axDiv3.description)", "\"D\""); 56 var accNameForDiv3 = platformValueForW3CName(axDiv3); 57 shouldBe("lastChar(accNameForDiv3)", "\"D\""); 57 58 58 59 var div4 = document.getElementById('div4'); … … 81 82 shouldBe("axDiv7.title.indexOf('List item')", "-1"); 82 83 shouldBe("axDiv7.title.indexOf('Initial text before list') >= 0", "false"); 84 85 document.getElementById("content").style.visibility = "hidden"; 83 86 } 84 87 -
trunk/LayoutTests/accessibility/help-text.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 66 67 if (!ax) 67 68 continue; 68 var output; 69 if (accessibilityController.platformName == "atk") 70 output = ax.description.replace("AXDescription: ", ""); 71 else 72 output = ax.helpText.replace("AXHelp: ", ""); 69 var output = platformValueForW3CDescription(ax); 73 70 var result = document.getElementById("console"); 74 71 if (expectation === output) -
trunk/LayoutTests/accessibility/img-alt-tag-only-whitespace-expected.txt
r201072 r201216 1 CONSOLE MESSAGE: line 27: Image description: AXDescription: Image2 1 3 2 … … 9 8 10 9 PASS imagesGroup.childrenCount is 1 10 PASS platformValueForW3CName(imagesGroup.childAtIndex(0)) is " Image " 11 11 PASS successfullyParsed is true 12 12 -
trunk/LayoutTests/accessibility/img-alt-tag-only-whitespace.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 24 25 var imagesGroup = accessibilityController.focusedElement; 25 26 shouldBe("imagesGroup.childrenCount", "1"); 26 if (accessibilityController.platformName != "atk") 27 console.log("Image description: " + imagesGroup.childAtIndex(0).description); 28 else 29 console.log("Image title: " + imagesGroup.childAtIndex(0).title); 27 shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(0))", " Image "); 30 28 } 31 29 -
trunk/LayoutTests/accessibility/img-aria-button-alt-tag-expected.txt
r151924 r201216 1 1 2 This test makes sure that a img acting as an aria button still returns its alt tag as the description2 This test makes sure that a img acting as an aria button still returns its alt tag as the accessible name 3 3 4 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 5 5 6 6 7 imgUIElement.description is AXDescription: alternate 7 PASS platformValueForW3CName(imgUIElement) is "alternate" 8 8 PASS successfullyParsed is true 9 9 -
trunk/LayoutTests/accessibility/img-aria-button-alt-tag.html
r201072 r201216 2 2 <head> 3 3 <script src="../resources/js-test-pre.js"></script> 4 <script src="../resources/accessibility-helper.js"></script> 4 5 </head> 5 6 <script> … … 15 16 16 17 <script> 17 description("This test makes sure that a img acting as an aria button still returns its alt tag as the description");18 description("This test makes sure that a img acting as an aria button still returns its alt tag as the accessible name"); 18 19 19 20 if (window.accessibilityController) { … … 22 23 var body = document.getElementById("body").focus(); 23 24 var imgUIElement = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0); 24 if (accessibilityController.platformName == "atk") 25 debug("imgUIElement.title is " + imgUIElement.title); 26 else 27 debug("imgUIElement.description is " + imgUIElement.description); 25 shouldBeEqualToString("platformValueForW3CName(imgUIElement)", "alternate"); 28 26 } 29 27 </script> -
trunk/LayoutTests/accessibility/img-fallsback-to-title.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 29 30 // The title should NOT be in the help text. 30 31 var image1 = imagesGroup.childAtIndex(0).childAtIndex(0); 31 if (accessibilityController.platformName == "atk") { 32 debug("Image1 title: " + image1.title); 33 debug("Image1 description: " + image1.description + "<br>"); 34 } else { 35 debug("Image1 description: " + image1.description); 36 debug("Image1 help: " + image1.helpText + "<br>"); 37 } 32 debug("Image1:"); 33 debug(platformTextAlternatives(image1)); 38 34 39 35 // Second image should use the description from the alt tag instead of the title. 40 36 // The help text should reflect what's in the title. 41 37 var image2 = imagesGroup.childAtIndex(0).childAtIndex(1); 42 if (accessibilityController.platformName == "atk") { 43 debug("Image2 title: " + image2.title); 44 debug("Image2 description: " + image2.description + "<br>"); 45 } else { 46 debug("Image2 description: " + image2.description); 47 debug("Image2 help: " + image2.helpText + "<br>"); 48 } 38 debug("Image2:"); 39 debug(platformTextAlternatives(image2)); 49 40 50 41 // Now do the same checks for ARIA type images. 51 42 var image3 = imagesGroup.childAtIndex(1); 52 if (accessibilityController.platformName == "atk") { 53 debug("Image3 title: " + image3.title); 54 debug("Image3 description: " + image3.description + "<br>"); 55 } else { 56 debug("Image3 description: " + image3.description); 57 debug("Image3 help: " + image3.helpText + "<br>"); 58 } 43 debug("Image3:"); 44 debug(platformTextAlternatives(image3)); 59 45 60 46 // Now do the same checks for ARIA type images. 61 47 var image4 = imagesGroup.childAtIndex(2); 62 if (accessibilityController.platformName == "atk") { 63 debug("Image4 title: " + image4.title); 64 debug("Image4 description: " + image4.description + "<br>"); 65 } else { 66 debug("Image4 description: " + image4.description); 67 debug("Image4 help: " + image4.helpText + "<br>"); 68 } 48 debug("Image4:"); 49 debug(platformTextAlternatives(image4)); 69 50 70 51 // Verify that the first image (with an empty alt tag) is ignored -
trunk/LayoutTests/accessibility/input-image-alt-expected.txt
r151924 r201216 1 1 2 This test makes sure that an input image returns its alt tag as the description2 This test makes sure that an input image returns its alt tag as the accessible name 3 3 4 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 5 5 6 6 7 img.description is AXDescription: Submit 7 PASS platformValueForW3CName(img) is "Submit" 8 8 PASS successfullyParsed is true 9 9 -
trunk/LayoutTests/accessibility/input-image-alt.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 13 14 <script> 14 15 if (window.accessibilityController) { 15 description("This test makes sure that an input image returns its alt tag as the description");16 description("This test makes sure that an input image returns its alt tag as the accessible name"); 16 17 17 18 var image1 = document.getElementById("image1").focus(); 18 19 var img = accessibilityController.focusedElement; 19 20 if (accessibilityController.platformName == "atk") 21 debug("img.title is " + img.title); 22 else 23 debug("img.description is " + img.description); 20 shouldBeEqualToString("platformValueForW3CName(img)", "Submit"); 24 21 } 25 22 </script> -
trunk/LayoutTests/accessibility/loading-iframe-sends-notification.html
r201072 r201216 2 2 <head> 3 3 <script src="../resources/js-test-pre.js"></script> 4 <script src="../resources/accessibility-helper.js"></script> 4 5 </head> 5 6 <body> … … 56 57 // Ignore this notification if it's not on the iframe or not about the iframe being loaded. 57 58 58 var targetString; 59 if (accessibilityController.platformName == "atk") 60 targetString = target.title; 61 else 62 targetString = target.description; 63 59 var targetString = platformValueForW3CName(target); 64 60 if (targetString.indexOf("InnerFrame") == -1 65 61 || (notification != "AXLoadComplete" && notification != "AXLayoutComplete")) -
trunk/LayoutTests/accessibility/self-referencing-aria-labelledby-expected.txt
r155601 r201216 1 X ? Y Z2 1 This tests that self-referencing aria-labelledby is exposed correctly. 3 2 … … 5 4 6 5 7 PASS test.description is 'AXDescription: X Y Z'8 PASS test.description is 'AXDescription: X Y Z'9 PASS test.description is 'AXDescription: X Y Z'10 PASS test.description is 'AXDescription: X Y Z'11 PASS test.description is 'AXDescription: X Y Z'12 PASS test.description is 'AXDescription: X Y Z'13 PASS test.description is 'AXDescription: X Y Z'6 PASS platformValueForW3CName(test) is "X Y Z" 7 PASS platformValueForW3CName(test) is "X Y Z" 8 PASS platformValueForW3CName(test) is "X Y Z" 9 PASS platformValueForW3CName(test) is "X Y Z" 10 PASS platformValueForW3CName(test) is "X Y Z" 11 PASS platformValueForW3CName(test) is "X Y Z" 12 PASS platformValueForW3CName(test) is "X Y Z" 14 13 PASS successfullyParsed is true 15 14 -
trunk/LayoutTests/accessibility/self-referencing-aria-labelledby.html
r201072 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 <title>Self-Referencing aria-labelledby</title> 6 7 </head> 7 8 <body> 8 9 <div id="content"> 9 10 <!-- Self-referencing label should be the content text. --> 10 11 <a aria-labelledby="t0 s0 s1" class="test" href="#" id="t0">X</a> … … 30 31 <span id="s0">Y</span> 31 32 <span id="s1">Z</span> 32 33 </div> 33 34 <p id="description"></p> 34 35 <div id="console"></div> … … 41 42 for (var i = 0; i < testCount; ++i) { 42 43 var test = accessibilityController.accessibleElementById("t" + i); 43 if (accessibilityController.platformName == "atk") 44 shouldBe("test.title", "'AXTitle: X Y Z'"); 45 else 46 shouldBe("test.description", "'AXDescription: X Y Z'"); 44 shouldBeEqualToString("platformValueForW3CName(test)", "X Y Z"); 47 45 } 46 47 document.getElementById("content").style.visibility = "hidden"; 48 48 } 49 49 </script> -
trunk/LayoutTests/accessibility/svg-bounds.html
r201072 r201216 3 3 <body> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 6 7 <div id="container" style="position: relative; top: 100px; left: 600px; width:400px; height: 400px;" role="group" tabindex="0"> … … 35 36 } 36 37 37 function label(element) {38 return accessibilityController.platformName == "atk" ? element.title: element.description;39 }40 41 38 if (window.testRunner && window.accessibilityController) { 42 39 window.testRunner.dumpAsText(); … … 51 48 var face = container.childAtIndex(0); 52 49 debug('Face role: ' + face.role); 53 debug('Face label: ' + label(face));50 debug('Face label: ' + platformValueForW3CName(face, true)); 54 51 debug('FaceX: ' + (pageX(face) - x)); 55 52 debug('FaceY: ' + Math.abs(pageY(face) - y)); … … 58 55 var eye = container.childAtIndex(1); 59 56 debug('Eye role: ' + eye.role); 60 debug('Eye label: ' + label(eye));57 debug('Eye label: ' + platformValueForW3CName(eye, true)); 61 58 debug('EyeX: ' + (pageX(eye) - x)); 62 59 debug('EyeY: ' + Math.abs(pageY(eye) - y)); … … 65 62 var nose = container.childAtIndex(3); 66 63 debug('Nose role: ' + nose.role); 67 debug('Nose label: ' + label(nose));64 debug('Nose label: ' + platformValueForW3CName(nose, true)); 68 65 debug('NoseX: ' + (pageX(nose) - x)); 69 66 debug('NoseY: ' + Math.abs(pageY(nose) - y)); … … 72 69 var mouth = container.childAtIndex(4); 73 70 debug('Mouth role: ' + mouth.role); 74 debug('Mouth label: ' + label(mouth));71 debug('Mouth label: ' + platformValueForW3CName(mouth, true)); 75 72 debug('MouthX: ' + (pageX(mouth) - x)); 76 73 debug('MouthY: ' + Math.floor(Math.abs(pageY(mouth) - y))); … … 89 86 var image = container.childAtIndex(6); 90 87 debug('Image role: ' + image.role); 91 debug('Image label: ' + label(image));88 debug('Image label: ' + platformValueForW3CName(image, true)); 92 89 debug('ImageX: ' + (pageX(image) - x)); 93 90 debug('ImageY: ' + Math.abs(pageY(image) - y)); -
trunk/LayoutTests/accessibility/svg-group-element-with-title-expected.txt
r147802 r201216 6 6 Verify that the SVG group is returned as an accessible element. 7 7 PASS group1.role is 'AXRole: AXGroup' 8 PASS group1.description is 'AXDescription: SVG TITLE 1'8 PASS platformValueForW3CName(group1) is "SVG TITLE 1" 9 9 10 10 Verify that you can hit-test to the SVG group. -
trunk/LayoutTests/accessibility/svg-group-element-with-title.html
r197616 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 25 26 var group1 = accessibilityController.accessibleElementById("group1"); 26 27 shouldBe("group1.role", "'AXRole: AXGroup'"); 27 if (accessibilityController.platformName == "atk") 28 shouldBe("group1.title", "'AXTitle: SVG TITLE 1'"); 29 else 30 shouldBe("group1.description", "'AXDescription: SVG TITLE 1'"); 28 shouldBeEqualToString("platformValueForW3CName(group1)", "SVG TITLE 1"); 31 29 32 30 debug("\nVerify that you can hit-test to the SVG group."); -
trunk/LayoutTests/accessibility/svg-image-expected.txt
r168350 r201216 6 6 7 7 PASS svgImage.role is realImage.role 8 PASS svgImage.description is realImage.description 8 PASS platformValueForW3CName(svgImage) is platformValueForW3CName(realImage) 9 PASS platformValueForW3CDescription(svgImage) is platformValueForW3CDescription(realImage) 9 10 SVG Image Role: AXRole: AXImage 10 SVG Image Description: AXDescription: TestImage 11 SVG Image Accessible Name: TestImage 12 SVG Image Accessible Description: 11 13 PASS successfullyParsed is true 12 14 -
trunk/LayoutTests/accessibility/svg-image.html
r197616 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 28 29 var svgImage = accessibilityController.focusedElement; 29 30 shouldBe("svgImage.role", "realImage.role"); 30 if (accessibilityController.platformName == "atk") 31 shouldBe("svgImage.title", "realImage.title"); 32 else 33 shouldBe("svgImage.description", "realImage.description"); 34 31 shouldBe("platformValueForW3CName(svgImage)", "platformValueForW3CName(realImage)"); 32 shouldBe("platformValueForW3CDescription(svgImage)", "platformValueForW3CDescription(realImage)"); 33 35 34 debug("SVG Image Role: " + svgImage.role); 36 if (accessibilityController.platformName == "atk") 37 debug("SVG Image Title: " + svgImage.title); 38 else 39 debug("SVG Image Description: " + svgImage.description); 35 debug("SVG Image Accessible Name: " + platformValueForW3CName(svgImage)); 36 debug("SVG Image Accessible Description: " + platformValueForW3CDescription(svgImage)); 40 37 } 41 38 -
trunk/LayoutTests/accessibility/svg-labelledby-expected.txt
r166917 r201216 5 5 6 6 7 SVG Element: AXDescription: Sudan 7 PASS platformValueForW3CName(image) is "Sudan" 8 8 PASS successfullyParsed is true 9 9 -
trunk/LayoutTests/accessibility/svg-labelledby.html
r197616 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body> … … 29 30 if (window.accessibilityController) { 30 31 var image = accessibilityController.accessibleElementById("Sudan"); 31 if (accessibilityController.platformName == "atk") 32 debug("SVG Element: " + image.title); 33 else 34 debug("SVG Element: " + image.description); 32 shouldBeEqualToString("platformValueForW3CName(image)", "Sudan"); 35 33 } 36 34 -
trunk/LayoutTests/accessibility/svg-remote-element.html
r197616 r201216 3 3 <body> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 6 7 <img tabindex="0" id="svg-image" alt="interactive SVG" > … … 22 23 } 23 24 24 function label(axElement) {25 return accessibilityController.platformName == "atk" ? axElement.title : axElement.description;26 }27 28 25 function runAXTest() { 29 26 var container = accessibilityController.accessibleElementById("svg-image"); … … 36 33 var face = container.childAtIndex(0); 37 34 debug('Face role: ' + face.role); 38 debug('Face label: ' + label(face));35 debug('Face label: ' + platformValueForW3CName(face, true)); 39 36 debug('FaceX: ' + (pageX(face) - x)); 40 37 debug('FaceY: ' + Math.abs(pageY(face) - y)); … … 43 40 var eye = container.childAtIndex(1); 44 41 debug('Eye role: ' + eye.role); 45 debug('Eye label: ' + label(eye));42 debug('Eye label: ' + platformValueForW3CName(eye, true)); 46 43 debug('EyeX: ' + (pageX(eye) - x)); 47 44 debug('EyeY: ' + Math.abs(pageY(eye) - y)); … … 50 47 var nose = container.childAtIndex(3); 51 48 debug('Nose role: ' + nose.role); 52 debug('Nose label: ' + label(nose));49 debug('Nose label: ' + platformValueForW3CName(nose, true)); 53 50 debug('NoseX: ' + (pageX(nose) - x)); 54 51 debug('NoseY: ' + Math.abs(pageY(nose) - y)); … … 57 54 var mouth = container.childAtIndex(4); 58 55 debug('Mouth role: ' + mouth.role); 59 debug('Mouth label: ' + label(mouth));56 debug('Mouth label: ' + platformValueForW3CName(mouth, true)); 60 57 debug('MouthX: ' + (pageX(mouth) - x)); 61 58 debug('MouthY: ' + Math.floor(Math.abs(pageY(mouth) - y))); -
trunk/LayoutTests/accessibility/w3c-svg-description-calculation.html
r197616 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 279 280 <div id="console"></div> 280 281 <script> 281 function textAlternatives(axElement) {282 if (!axElement)283 return "Element not exposed";284 285 result = axElement.title + "\n\t" + axElement.description;286 if (accessibilityController.platformName == "mac")287 result += "\n\t" + axElement.helpText;288 return result;289 }290 291 282 description("This tests the accessible text alternatives results for SVG."); 292 283 if (window.accessibilityController) { … … 294 285 var element = document.getElementById("test" + i); 295 286 var axElement = accessibilityController.accessibleElementById("test" + i); 296 var result = textAlternatives(axElement);297 debug("test" + i + ":\n\tExpected " + element.getAttribute("data-expected") + "\n \t" + result);287 var result = platformTextAlternatives(axElement); 288 debug("test" + i + ":\n\tExpected " + element.getAttribute("data-expected") + "\n" + result); 298 289 } 299 290 document.getElementById("content").style.visibility = "hidden"; -
trunk/LayoutTests/accessibility/w3c-svg-name-calculation.html
r198254 r201216 3 3 <head> 4 4 <script src="../resources/js-test-pre.js"></script> 5 <script src="../resources/accessibility-helper.js"></script> 5 6 </head> 6 7 <body id="body"> … … 310 311 <div id="console"></div> 311 312 <script> 312 function textAlternatives(axElement) {313 if (!axElement)314 return "Element not exposed";315 316 result = axElement.title + "\n\t" + axElement.description;317 if (accessibilityController.platformName == "mac")318 result += "\n\t" + axElement.helpText;319 result += "\n\tAXTitleUIElement: " + (axElement.titleUIElement() ? "non-null" : "null");320 return result;321 }322 323 313 description("This tests the accessible text alternatives results for SVG."); 324 314 if (window.accessibilityController) { … … 326 316 var element = document.getElementById("test" + i); 327 317 var axElement = accessibilityController.accessibleElementById("test" + i); 328 var result = textAlternatives(axElement);329 debug("test" + i + ":\n\tExpected " + element.getAttribute("data-expected") + "\n \t" + result);318 var result = platformTextAlternatives(axElement, true); 319 debug("test" + i + ":\n\tExpected " + element.getAttribute("data-expected") + "\n" + result); 330 320 } 331 321 document.getElementById("content").style.visibility = "hidden"; -
trunk/LayoutTests/platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt
r201072 r201216 1 Shut down computer after minutes2 1 This tests that if aria-labelledby is used, then label elements are not used 3 2 … … 5 4 6 5 7 text.title is AXTitle: Shut down computer after 10 minutes 6 PASS platformValueForW3CName(text) is "Shut down computer after 10 minutes" 8 7 PASS text.titleUIElement() != null && text.titleUIElement().isValid is false 9 8 Label element role is: AXRole: AXLabel -
trunk/LayoutTests/platform/gtk/accessibility/canvas-description-and-role-expected.txt
r201072 r201216 5 5 6 6 PASS axContainer.childrenCount is 2 7 Canvas 1 title: AXTitle: Canvas label 7 PASS platformValueForW3CName(axCanvas1) is "Canvas label" 8 8 Canvas 1 role: AXRole: AXCanvas 9 Canvas 2 title: AXTitle: 9 PASS platformValueForW3CName(axCanvas2) is "" 10 10 Canvas 2 role: AXRole: AXCanvas 11 11 PASS successfullyParsed is true -
trunk/LayoutTests/platform/gtk/accessibility/empty-image-with-title-expected.txt
r201072 r201216 6 6 7 7 image1.role is AXRole: AXImage 8 image1 .title is AXTitle: baz8 image1's accessible name with source is AXTitle: baz 9 9 PASS successfullyParsed is true 10 10 -
trunk/LayoutTests/platform/gtk/accessibility/img-fallsback-to-title-expected.txt
r201072 r201216 6 6 7 7 8 Image1 title: AXTitle: test19 Image1 description: AXDescription: 10 11 Image2 title: AXTitle: alt12 Image2 description: AXDescription: test2 13 14 Image3 title: AXTitle: test315 Image3 description: AXDescription: 16 17 Image4 title: AXTitle: alt18 Image4 description: AXDescription: test4 19 8 Image1: 9 AXTitle: test1 10 AXDescription: 11 Image2: 12 AXTitle: alt 13 AXDescription: test2 14 Image3: 15 AXTitle: test3 16 AXDescription: 17 Image4: 18 AXTitle: alt 19 AXDescription: test4 20 20 PASS imagesGroup.childAtIndex(0).childrenCount is 2 21 21 PASS successfullyParsed is true -
trunk/LayoutTests/platform/mac/accessibility/canvas-description-and-role-expected.txt
r127084 r201216 5 5 6 6 PASS axContainer.childrenCount is 2 7 Canvas 1 description: AXDescription: Canvas label 7 PASS platformValueForW3CName(axCanvas1) is "Canvas label" 8 8 Canvas 1 role: AXRole: AXImage 9 Canvas 2 description: AXDescription: 9 PASS platformValueForW3CName(axCanvas2) is "" 10 10 Canvas 2 role: AXRole: AXGroup 11 11 PASS successfullyParsed is true -
trunk/LayoutTests/platform/mac/accessibility/img-fallsback-to-title-expected.txt
r152388 r201216 6 6 7 7 8 Image1 description: AXDescription: test1 9 Image1 help: AXHelp: 10 11 Image2 description: AXDescription: alt 12 Image2 help: AXHelp: test2 13 14 Image3 description: AXDescription: test3 15 Image3 help: AXHelp: 16 17 Image4 description: AXDescription: alt 18 Image4 help: AXHelp: test4 19 8 Image1: 9 AXTitle: 10 AXDescription: test1 11 AXHelp: 12 Image2: 13 AXTitle: 14 AXDescription: alt 15 AXHelp: test2 16 Image3: 17 AXTitle: 18 AXDescription: test3 19 AXHelp: 20 Image4: 21 AXTitle: 22 AXDescription: alt 23 AXHelp: test4 20 24 PASS imagesGroup.childAtIndex(0).childrenCount is 2 21 25 PASS successfullyParsed is true -
trunk/LayoutTests/platform/win/accessibility/canvas-description-and-role-expected.txt
r179026 r201216 5 5 6 6 PASS axContainer.childrenCount is 2 7 Canvas 1 description: AXDescription: Canvas label 7 PASS platformValueForW3CName(axCanvas1) is "Canvas label" 8 8 Canvas 1 role: AXRole: AXImage 9 Canvas 2 description: AXDescription: 9 PASS platformValueForW3CName(axCanvas2) is "" 10 10 Canvas 2 role: AXRole: AXImage 11 11 PASS successfullyParsed is true -
trunk/LayoutTests/resources/accessibility-helper.js
r184213 r201216 33 33 return true; 34 34 } 35 36 function platformValueForW3CName(accessibilityObject, includeSource=false) { 37 var result; 38 if (accessibilityController.platformName == "atk") 39 result = accessibilityObject.title 40 else 41 result = accessibilityObject.description 42 43 if (!includeSource) { 44 var splitResult = result.split(": "); 45 return splitResult[1]; 46 } 47 48 return result; 49 } 50 51 function platformValueForW3CDescription(accessibilityObject, includeSource=false) { 52 var result; 53 if (accessibilityController.platformName == "atk") 54 result = accessibilityObject.description 55 else 56 result = accessibilityObject.helpText; 57 58 if (!includeSource) { 59 var splitResult = result.split(": "); 60 return splitResult[1]; 61 } 62 63 return result; 64 } 65 66 function platformTextAlternatives(accessibilityObject, includeTitleUIElement=false) { 67 if (!accessibilityObject) 68 return "Element not exposed"; 69 70 result = "\t" + accessibilityObject.title + "\n\t" + accessibilityObject.description; 71 if (accessibilityController.platformName == "mac") 72 result += "\n\t" + accessibilityObject.helpText; 73 if (includeTitleUIElement) 74 result += "\n\tAXTitleUIElement: " + (accessibilityObject.titleUIElement() ? "non-null" : "null"); 75 return result; 76 } 77 78 function platformRoleForComboBox() { 79 return accessibilityController.platformName == "atk" ? "AXRole: AXComboBox" : "AXRole: AXPopUpButton"; 80 } 81 82 function platformRoleForStaticText() { 83 return accessibilityController.platformName == "atk" ? "AXRole: AXStatic" : "AXRole: AXStaticText"; 84 }
Note: See TracChangeset
for help on using the changeset viewer.