Changeset 204707 in webkit
- Timestamp:
- Aug 22, 2016 6:04:05 AM (8 years ago)
- Location:
- releases/WebKitGTK/webkit-2.12
- Files:
-
- 7 added
- 2 deleted
- 82 edited
- 3 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog
r201286 r204707 1 2016-05-25 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 and update the expectations files. 29 30 Reviewed by Chris Fleizach. 31 32 * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. 33 * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. 34 * accessibility/aria-help-expected.txt: Added. 35 * accessibility/aria-help.html: Updated. 36 * accessibility/aria-label-expected.txt: Updated. 37 * accessibility/aria-label.html: Updated. 38 * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. 39 * accessibility/aria-labeled-with-hidden-node.html: Updated. 40 * accessibility/aria-labelledby-on-input-expected.txt: Updated. 41 * accessibility/aria-labelledby-on-input.html: Updated. 42 * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. 43 * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. 44 * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. 45 * accessibility/aria-labelledby-overrides-label.html: Updated. 46 * accessibility/aria-labelledby-stay-within-expected.txt: Updated. 47 * accessibility/aria-labelledby-stay-within.html: Updated. 48 * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. 49 * accessibility/aria-labelledby-with-descendants.html: Updated. 50 * accessibility/aria-namefrom-author-expected.txt: Updated. 51 * accessibility/aria-namefrom-author.html: Updated. 52 * accessibility/aria-text-role-expected.txt: Updated. 53 * accessibility/aria-text-role.html: Updated. 54 * accessibility/canvas-description-and-role-expected.txt: Updated. 55 * accessibility/canvas-description-and-role.html: Updated. 56 * accessibility/canvas-fallback-content.html: Updated. 57 * accessibility/empty-image-with-title-expected.txt: Updated. 58 * accessibility/empty-image-with-title.html: Updated. 59 * accessibility/fieldset-element-expected.txt: Updated. 60 * accessibility/fieldset-element.html: Updated. 61 * accessibility/focusable-div-expected.txt: Updated. 62 * accessibility/focusable-div.html: Updated. 63 * accessibility/help-text.html: Updated. 64 * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. 65 * accessibility/img-alt-tag-only-whitespace.html: Updated. 66 * accessibility/img-aria-button-alt-tag-expected.txt: Updated. 67 * accessibility/img-aria-button-alt-tag.html: Updated. 68 * accessibility/img-fallsback-to-title.html: Updated. 69 * accessibility/input-image-alt-expected.txt: Updated. 70 * accessibility/input-image-alt.html: Updated. 71 * accessibility/loading-iframe-sends-notification.html: Updated. 72 * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. 73 * accessibility/self-referencing-aria-labelledby.html: Updated. 74 * accessibility/svg-bounds.html: Updated. 75 * accessibility/svg-group-element-with-title-expected.txt: Updated. 76 * accessibility/svg-group-element-with-title.html: Updated. 77 * accessibility/svg-image-expected.txt: Updated. 78 * accessibility/svg-image.html: Updated. 79 * accessibility/svg-labelledby-expected.txt: Updated. 80 * accessibility/svg-labelledby.html: Updated. 81 * accessibility/svg-remote-element.html: Updated. 82 * accessibility/w3c-svg-description-calculation.html: Updated. 83 * accessibility/w3c-svg-name-calculation.html: Updated. 84 * platform/gtk/TestExpectations: Updated. 85 * platform/gtk/accessibility/aria-hidden-negates-no-visibility-expected.txt: Added. 86 * platform/gtk/accessibility/aria-labelledby-overrides-aria-label-expected.txt: Added. 87 * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Added. 88 * platform/gtk/accessibility/aria-option-role-expected.txt: Added. 89 * platform/gtk/accessibility/aria-switch-text-expected.txt: Updated. 90 * platform/gtk/accessibility/aria-text-role-expected.txt: Added. 91 * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Added. 92 * platform/gtk/accessibility/empty-image-with-title-expected.txt: Added. 93 * platform/gtk/accessibility/help-text-expected.txt: Added. 94 * platform/gtk/accessibility/image-link-expected.txt: Updated (Gardening). 95 * platform/gtk/accessibility/image-map1-expected.txt: Updated (Gardening). 96 * platform/gtk/accessibility/image-map2-expected.txt: Updated (Gardening). 97 * platform/gtk/accessibility/image-with-alt-and-map-expected.txt: Updated. 98 * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. 99 * platform/gtk/accessibility/math-multiscript-attributes-expected.txt: Updated (Gardening). 100 * platform/gtk/accessibility/media-element-expected.txt: Updated. 101 * platform/gtk/accessibility/radio-button-title-label-expected.txt: Updated. 102 * platform/gtk/accessibility/svg-bounds-expected.txt: Added. 103 * platform/gtk/accessibility/svg-remote-element-expected.txt: Added. 104 * platform/gtk/accessibility/table-attributes-expected.txt: Updated (Gardening). 105 * platform/gtk/accessibility/table-cell-spans-expected.txt: Updated (Gardening). 106 * platform/gtk/accessibility/table-cells-expected.txt: Updated (Gardening). 107 * platform/gtk/accessibility/table-detection-expected.txt: Updated (Gardening). 108 * platform/gtk/accessibility/table-sections-expected.txt: Updated (Gardening). 109 * platform/mac/accessibility/aria-help-expected.txt: Removed. 110 * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. 111 * platform/mac/accessibility/fieldset-element-expected.txt: Removed. 112 * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. 113 * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. 114 * resources/accessibility-helper.js: 115 (platformValueForW3CName): Added. 116 (platformValueForW3CDescription): Added. 117 (platformTextAlternatives): Added. 118 (platformRoleForComboBox): Added. 119 (platformRoleForStaticText): Added. 120 1 121 2016-03-23 Michael Saboff <msaboff@apple.com> 2 122 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt
r160311 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/alt-tag-on-image-with-nonimage-role.html
r160311 r204707 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) { … … 25 26 26 27 var group = accessibilityController.accessibleElementById("group"); 27 shouldBe("group.description", "'AXDescription: TEST2'");28 var button = accessibilityController.accessibleElementById("button"); 28 29 29 var button = accessibilityController.accessibleElementById("button");30 shouldBe ("button.description", "'AXDescription: TEST3'");30 shouldBeEqualToString("platformValueForW3CName(group)", "TEST2"); 31 shouldBeEqualToString("platformValueForW3CName(button)", "TEST3"); 31 32 } 32 33 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-help-expected.txt
r204706 r204707 1 button2 1 This tests that aria-help attribute works as expected. 3 2 … … 5 4 6 5 7 FAIL button.helpText should be AXHelp: click here (of type string). Was null (of type object). 6 PASS platformValueForW3CName(axButton) is "title" 7 PASS platformValueForW3CDescription(axButton) is "click here" 8 8 PASS successfullyParsed is true 9 9 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-help.html
r159128 r204707 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 shouldBe("button.helpText", "'AXHelp: click here'"); 26 document.getElementById("content").style.visibility = "hidden"; 24 27 } 25 26 28 </script> 27 29 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-label-expected.txt
r45456 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-label.html
r155274 r204707 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 = obj.description == "AXDescription: aria label";22 shouldBe("succeeded", "true");23 23 24 obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(1); 25 succeeded = obj.description == "AXDescription: aria link"; 26 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"; 27 31 } 28 29 32 </script> 30 33 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labeled-with-hidden-node-expected.txt
r157221 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labeled-with-hidden-node.html
r157221 r204707 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 shouldBe("button.description", "'AXDescription: TITLE'"); 21 shouldBeEqualToString("platformValueForW3CName(button)", "TITLE"); 22 23 document.getElementById("content").style.visibility = "hidden"; 21 24 } 22 25 </script> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-on-input-expected.txt
r114362 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-on-input.html
r120111 r204707 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 <script> 13 if (window.accessibilityController) { 14 var labeledItem = document.getElementById("time"); 15 labeledItem.focus(); 16 var result = document.getElementById("result"); 17 result.innerText = "\nThe accessibility description is \"" + accessibilityController.focusedElement.description + "\""; 18 } 19 </script> 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> 20 25 </body> 21 26 </html> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt
r159482 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby.html
r159482 r204707 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 var linkDescription = accessibilityController.accessibleElementById("link").description; 27 28 shouldBe("linkDescription", "'AXDescription: Y Z'"); 29 27 var axLink = accessibilityController.accessibleElementById("link"); 28 shouldBeEqualToString("platformValueForW3CName(axLink)", "Y Z"); 29 30 30 // Hide superfluous text. 31 31 document.getElementById("test").style.display = "none"; -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt
r151924 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-overrides-label.html
r155274 r204707 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 debug("text.description is " + text.description); 25 shouldBeEqualToString("platformValueForW3CName(text)", "Shut down computer after 10 minutes"); 26 26 27 27 // There should be no title UI element. … … 32 32 // it's a label element (sometimes they are ignored). 33 33 debug("Label element role is: " + labelElement.role); 34 35 document.getElementById("content").style.visibility = "hidden"; 34 36 } 35 37 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-stay-within-expected.txt
r114362 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-stay-within.html
r120111 r204707 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 if ( accessibilityController.focusedElement.description == "AXDescription: Reply Item Five" ) { 36 result.innerText = "Passed"; 37 } 38 else { 39 result.innerText = "Failed. Result ==" + accessibilityController.focusedElement.description + "=="; 40 } 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"; 41 38 } 42 </script> 39 </script> 40 <script src="../resources/js-test-post.js"></script> 43 41 </body> 44 42 </html> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-with-descendants-expected.txt
r174080 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-with-descendants.html
r174074 r204707 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 debug("test " + k + ": aria-labelledby description: " + test.description);53 debug("test " + k + ": aria-labelledby description: " + platformValueForW3CName(test)); 53 54 debug("test " + k + ": expected description: " + document.getElementById("test" + k).getAttribute("data-label") + "\n"); 54 55 } -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-namefrom-author-expected.txt
r174074 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-namefrom-author.html
r174074 r204707 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 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 71 76 document.getElementById("content").style.visibility = "hidden"; 72 77 } -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-option-role.html
r155274 r204707 30 30 31 31 debug("secondChild.role is " + secondChild.role); 32 debug("secondChild.description is " + secondChild.description); 32 if (accessibilityController.platformName == "atk") 33 debug("secondChild.title is " + secondChild.title); 34 else 35 debug("secondChild.description is " + secondChild.description); 33 36 34 37 shouldBe("firstChild.childrenCount", "0"); -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-text-role-expected.txt
r51576 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-text-role.html
r155274 r204707 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"> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/canvas-description-and-role-expected.txt
r158810 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/canvas-description-and-role.html
r155274 r204707 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 debug('Canvas 1 description: ' + axCanvas1.description);25 shouldBeEqualToString("platformValueForW3CName(axCanvas1)", "Canvas label"); 25 26 debug('Canvas 1 role: ' + axCanvas1.role); 26 27 27 28 var axCanvas2 = axContainer.childAtIndex(1); 28 debug('Canvas 2 description: ' + axCanvas2.description);29 shouldBeEqualToString("platformValueForW3CName(axCanvas2)", ""); 29 30 debug('Canvas 2 role: ' + axCanvas2.role); 30 31 } -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/canvas-fallback-content.html
r161666 r204707 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. -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/empty-image-with-title-expected.txt
r151924 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/empty-image-with-title.html
r155274 r204707 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 debug("image1.description is " + image1.description); 20 21 var accNameWithSource = platformValueForW3CName(image1, true); 22 debug("image1's accessible name with source is " + accNameWithSource); 21 23 } 22 24 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/fieldset-element-expected.txt
r178471 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/fieldset-element.html
r157434 r204707 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 fieldsetDescription = accessibilityController.accessibleElementById("f" + i).description;82 debug( fieldsetDescription);82 var accName = platformValueForW3CName(accessibilityController.accessibleElementById("f" + i)); 83 debug("element id 'f" + i + "': " + accName); 83 84 } 84 85 85 86 // legend tests. 86 legendValue = accessibilityController.accessibleElementById("l0").childAtIndex(0).stringValue; 87 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"; 88 93 } 89 94 </script> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/focusable-div-expected.txt
r162576 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/focusable-div.html
r162576 r204707 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 shouldBe("lastChar(axDiv3.description)", "\"D\""); 56 var accNameForDiv3 = platformValueForW3CName(axDiv3); 57 shouldBe("lastChar(accNameForDiv3)", "\"D\""); 54 58 55 59 var div4 = document.getElementById('div4'); … … 78 82 shouldBe("axDiv7.title.indexOf('List item')", "-1"); 79 83 shouldBe("axDiv7.title.indexOf('Initial text before list') >= 0", "false"); 84 85 document.getElementById("content").style.visibility = "hidden"; 80 86 } 81 87 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt
r187777 r204707 5 5 6 6 7 AXChildrenAdded on AX Description: inner body8 AXChildrenAdded on AX Description: inner body7 AXChildrenAdded on AXTitle: inner body 8 AXChildrenAdded on AXTitle: inner body 9 9 PASS successfullyParsed is true 10 10 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children.html
r187804 r204707 22 22 accessibilityController.addNotificationListener(function(element, notification) { 23 23 if (notification == "AXChildrenAdded" && element.role == "AXRole: AXGroup") 24 debug(notification + " on " + element. description);24 debug(notification + " on " + element.title); 25 25 }); 26 26 } -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/object-attributes-expected.txt
r187777 r204707 27 27 28 28 29 PASS child.role is 'AXRole: heading' 30 PASS child.allAttributes() is 'level:1, toolkit:WebKitGtk' 31 PASS child.role is 'AXRole: heading' 32 PASS child.allAttributes() is 'level:2, toolkit:WebKitGtk' 33 PASS child.role is 'AXRole: heading' 34 PASS child.allAttributes() is 'level:3, toolkit:WebKitGtk' 35 PASS child.role is 'AXRole: heading' 36 PASS child.allAttributes() is 'level:4, toolkit:WebKitGtk' 37 PASS child.role is 'AXRole: heading' 38 PASS child.allAttributes() is 'level:5, toolkit:WebKitGtk' 39 PASS child.role is 'AXRole: heading' 40 PASS child.allAttributes() is 'level:6, toolkit:WebKitGtk' 41 PASS child.role is 'AXRole: link' 42 PASS child.allAttributes() is 'toolkit:WebKitGtk' 43 PASS child.role is 'AXRole: table' 44 PASS child.allAttributes() is 'toolkit:WebKitGtk' 45 PASS child.role is 'AXRole: table' 46 PASS child.allAttributes() is 'toolkit:WebKitGtk' 29 AXRole: AXHeading 30 AXParent: AXWebArea 31 AXChildren: 0 32 AXPosition: { 8.000000, 8.000000 } 33 AXSize: { 784.000000, 36.000000 } 34 AXTitle: Heading Level 1 35 AXDescription: 36 AXValue: Heading Level 1 37 AXFocusable: 0 38 AXFocused: 0 39 AXSelectable: 0 40 AXSelected: 0 41 AXMultiSelectable: 0 42 AXEnabled: 1 43 AXExpanded: 0 44 AXRequired: 0 45 AXChecked: 0 46 AXPlatformAttributes: computed-role:heading, level:1, tag:h1, toolkit:WebKitGtk 47 ------------ 48 AXRole: AXHeading 49 AXParent: AXWebArea 50 AXChildren: 0 51 AXPosition: { 8.000000, 65.000000 } 52 AXSize: { 784.000000, 27.000000 } 53 AXTitle: Heading Level 2 54 AXDescription: 55 AXValue: Heading Level 2 56 AXFocusable: 0 57 AXFocused: 0 58 AXSelectable: 0 59 AXSelected: 0 60 AXMultiSelectable: 0 61 AXEnabled: 1 62 AXExpanded: 0 63 AXRequired: 0 64 AXChecked: 0 65 AXPlatformAttributes: computed-role:heading, level:2, tag:h2, toolkit:WebKitGtk 66 ------------ 67 AXRole: AXHeading 68 AXParent: AXWebArea 69 AXChildren: 0 70 AXPosition: { 8.000000, 111.000000 } 71 AXSize: { 784.000000, 22.000000 } 72 AXTitle: Heading Level 3 73 AXDescription: 74 AXValue: Heading Level 3 75 AXFocusable: 0 76 AXFocused: 0 77 AXSelectable: 0 78 AXSelected: 0 79 AXMultiSelectable: 0 80 AXEnabled: 1 81 AXExpanded: 0 82 AXRequired: 0 83 AXChecked: 0 84 AXPlatformAttributes: computed-role:heading, level:3, tag:h3, toolkit:WebKitGtk 85 ------------ 86 AXRole: AXHeading 87 AXParent: AXWebArea 88 AXChildren: 0 89 AXPosition: { 8.000000, 153.000000 } 90 AXSize: { 784.000000, 18.000000 } 91 AXTitle: Heading Level 4 92 AXDescription: 93 AXValue: Heading Level 4 94 AXFocusable: 0 95 AXFocused: 0 96 AXSelectable: 0 97 AXSelected: 0 98 AXMultiSelectable: 0 99 AXEnabled: 1 100 AXExpanded: 0 101 AXRequired: 0 102 AXChecked: 0 103 AXPlatformAttributes: computed-role:heading, level:4, tag:h4, toolkit:WebKitGtk 104 ------------ 105 AXRole: AXHeading 106 AXParent: AXWebArea 107 AXChildren: 0 108 AXPosition: { 8.000000, 192.000000 } 109 AXSize: { 784.000000, 16.000000 } 110 AXTitle: Heading Level 5 111 AXDescription: 112 AXValue: Heading Level 5 113 AXFocusable: 0 114 AXFocused: 0 115 AXSelectable: 0 116 AXSelected: 0 117 AXMultiSelectable: 0 118 AXEnabled: 1 119 AXExpanded: 0 120 AXRequired: 0 121 AXChecked: 0 122 AXPlatformAttributes: computed-role:heading, level:5, tag:h5, toolkit:WebKitGtk 123 ------------ 124 AXRole: AXHeading 125 AXParent: AXWebArea 126 AXChildren: 0 127 AXPosition: { 8.000000, 232.000000 } 128 AXSize: { 784.000000, 13.000000 } 129 AXTitle: Heading Level 6 130 AXDescription: 131 AXValue: Heading Level 6 132 AXFocusable: 0 133 AXFocused: 0 134 AXSelectable: 0 135 AXSelected: 0 136 AXMultiSelectable: 0 137 AXEnabled: 1 138 AXExpanded: 0 139 AXRequired: 0 140 AXChecked: 0 141 AXPlatformAttributes: computed-role:heading, level:6, tag:h6, toolkit:WebKitGtk 142 ------------ 143 AXRole: AXSection 144 AXParent: AXWebArea 145 AXChildren: 1 146 AXPosition: { 8.000000, 269.000000 } 147 AXSize: { 784.000000, 18.000000 } 148 AXTitle: 149 AXDescription: 150 AXValue: Link 151 AXFocusable: 0 152 AXFocused: 0 153 AXSelectable: 0 154 AXSelected: 0 155 AXMultiSelectable: 0 156 AXEnabled: 1 157 AXExpanded: 0 158 AXRequired: 0 159 AXChecked: 0 160 AXPlatformAttributes: toolkit:WebKitGtk 161 ------------ 162 AXRole: AXSection 163 AXParent: AXWebArea 164 AXChildren: 0 165 AXPosition: { 10.000000, 288.000000 } 166 AXSize: { 23.000000, 20.000000 } 167 AXTitle: 168 AXDescription: 169 AXValue: foo 170 AXFocusable: 0 171 AXFocused: 0 172 AXSelectable: 0 173 AXSelected: 0 174 AXMultiSelectable: 0 175 AXEnabled: 1 176 AXExpanded: 0 177 AXRequired: 0 178 AXChecked: 0 179 AXPlatformAttributes: tag:td, toolkit:WebKitGtk 180 ------------ 181 AXRole: AXSection 182 AXParent: AXWebArea 183 AXChildren: 0 184 AXPosition: { 35.000000, 288.000000 } 185 AXSize: { 22.000000, 20.000000 } 186 AXTitle: 187 AXDescription: 188 AXValue: bar 189 AXFocusable: 0 190 AXFocused: 0 191 AXSelectable: 0 192 AXSelected: 0 193 AXMultiSelectable: 0 194 AXEnabled: 1 195 AXExpanded: 0 196 AXRequired: 0 197 AXChecked: 0 198 AXPlatformAttributes: tag:td, toolkit:WebKitGtk 199 ------------ 200 AXRole: AXTable 201 AXParent: AXWebArea 202 AXChildren: 3 203 AXPosition: { 8.000000, 309.000000 } 204 AXSize: { 81.000000, 74.000000 } 205 AXTitle: 206 AXDescription: 207 AXFocusable: 0 208 AXFocused: 0 209 AXSelectable: 0 210 AXSelected: 0 211 AXMultiSelectable: 0 212 AXEnabled: 1 213 AXExpanded: 0 214 AXRequired: 0 215 AXChecked: 0 216 AXPlatformAttributes: computed-role:table, tag:table, toolkit:WebKitGtk 217 ------------ 218 AXRole: AXParagraph 219 AXParent: AXWebArea 220 AXChildren: 2 221 AXPosition: { 8.000000, 398.000000 } 222 AXSize: { 784.000000, 51.000000 } 223 AXTitle: 224 AXDescription: 225 AXValue: This tests the exposure of Atk object attributes.<\n><\n>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".<\n><\n><\n> 226 AXFocusable: 1 227 AXFocused: 0 228 AXSelectable: 0 229 AXSelected: 0 230 AXMultiSelectable: 0 231 AXEnabled: 1 232 AXExpanded: 0 233 AXRequired: 0 234 AXChecked: 0 235 AXPlatformAttributes: html-id:description, tag:p, toolkit:WebKitGtk 236 ------------ 237 47 238 PASS successfullyParsed is true 48 239 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/object-attributes.html
r187804 r204707 28 28 testRunner.dumpAsText(); 29 29 document.getElementById("body").focus(); 30 var webArea = accessibilityController.focusedElement; 31 var child = webArea.childAtIndex(0); 32 shouldBe("child.role", "'AXRole: heading'"); 33 shouldBe("child.allAttributes()", "'level:1, toolkit:WebKitGtk'"); 34 child = webArea.childAtIndex(1); 35 shouldBe("child.role", "'AXRole: heading'"); 36 shouldBe("child.allAttributes()", "'level:2, toolkit:WebKitGtk'"); 37 child = webArea.childAtIndex(2); 38 shouldBe("child.role", "'AXRole: heading'"); 39 shouldBe("child.allAttributes()", "'level:3, toolkit:WebKitGtk'"); 40 child = webArea.childAtIndex(3); 41 shouldBe("child.role", "'AXRole: heading'"); 42 shouldBe("child.allAttributes()", "'level:4, toolkit:WebKitGtk'"); 43 child = webArea.childAtIndex(4); 44 shouldBe("child.role", "'AXRole: heading'"); 45 shouldBe("child.allAttributes()", "'level:5, toolkit:WebKitGtk'"); 46 child = webArea.childAtIndex(5); 47 shouldBe("child.role", "'AXRole: heading'"); 48 shouldBe("child.allAttributes()", "'level:6, toolkit:WebKitGtk'"); 49 child = webArea.childAtIndex(6); 50 shouldBe("child.role", "'AXRole: link'"); 51 shouldBe("child.allAttributes()", "'toolkit:WebKitGtk'"); 52 child = webArea.childAtIndex(7); 53 shouldBe("child.role", "'AXRole: table'"); 54 shouldBe("child.allAttributes()", "'toolkit:WebKitGtk'"); 55 child = webArea.childAtIndex(8); 56 shouldBe("child.role", "'AXRole: table'"); 57 shouldBe("child.allAttributes()", "'toolkit:WebKitGtk'"); 30 debug(accessibilityController.focusedElement.attributesOfChildren()); 58 31 } 59 32 </script> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/title-and-alt-expected.txt
r187777 r204707 1 1 2 Functional label: 2 Functional label: 3 3 This tests the exposure of alt and title information. 4 4 … … 8 8 PASS image.title is 'AXTitle: Image alt attr' 9 9 PASS image.description is 'AXDescription: Image title attr' 10 PASS link.title is 'AXTitle: '10 PASS link.title is 'AXTitle: Functional label' 11 11 PASS link.description is 'AXDescription: Link title attr' 12 PASS entry.title is 'AXTitle: '13 PASS entry.description is 'AXDescription: Entry title attr'12 PASS entry.title is 'AXTitle: Entry title attr' 13 PASS entry.description is 'AXDescription: ' 14 14 PASS button.title is 'AXTitle: Submit' 15 15 PASS button.description is 'AXDescription: Submit button title attr' -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/title-and-alt.html
r187804 r204707 5 5 </head> 6 6 <body id="body"> 7 <img src="image.jpg" alt="Image alt attr" title="Image title attr" >7 <img src="image.jpg" alt="Image alt attr" title="Image title attr" id="image"> 8 8 <form> 9 <a href="" title="Link title attr">Functional label</a>:<input title="Entry title attr" type="text" /><input value="Clear" type="reset" /><input value="Submit" title="Submit button title attr" type="submit" /> 9 <a href="" title="Link title attr" id="link">Functional label</a>: 10 <input title="Entry title attr" type="text" id="entry" /> 11 <input value="Clear" type="reset" /> 12 <input value="Submit" title="Submit button title attr" type="submit" id="button" /> 10 13 </form> 11 14 <p id="description"></p> … … 15 18 if (window.accessibilityController) { 16 19 testRunner.dumpAsText(); 17 document.getElementById("body").focus();18 var webArea = accessibilityController.focusedElement;19 20 20 var image = webArea.childAtIndex(0);21 var image = accessibilityController.accessibleElementById("image"); 21 22 shouldBe("image.title", "'AXTitle: Image alt attr'"); 22 23 shouldBe("image.description", "'AXDescription: Image title attr'"); 23 24 24 var link = webArea.childAtIndex(1);25 shouldBe("link.title", "'AXTitle: '");25 var link = accessibilityController.accessibleElementById("link"); 26 shouldBe("link.title", "'AXTitle: Functional label'"); 26 27 shouldBe("link.description", "'AXDescription: Link title attr'"); 27 28 28 var entry = webArea.childAtIndex(2);29 shouldBe("entry.title", "'AXTitle: '");30 shouldBe("entry.description", "'AXDescription: Entry title attr'");29 var entry = accessibilityController.accessibleElementById("entry"); 30 shouldBe("entry.title", "'AXTitle: Entry title attr'"); 31 shouldBe("entry.description", "'AXDescription: '"); 31 32 32 var button = webArea.childAtIndex(4);33 var button = accessibilityController.accessibleElementById("button"); 33 34 shouldBe("button.title", "'AXTitle: Submit'"); 34 35 shouldBe("button.description", "'AXDescription: Submit button title attr'"); -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/help-text.html
r167054 r204707 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 = ax.helpText.replace("AXHelp: ", "");69 var output = platformValueForW3CDescription(ax); 69 70 var result = document.getElementById("console"); 70 71 if (expectation === output) -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-alt-tag-only-whitespace-expected.txt
r158810 r204707 1 CONSOLE MESSAGE: line 26: 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-alt-tag-only-whitespace.html
r155274 r204707 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 console.log("Image description: " + imagesGroup.childAtIndex(0).description);27 shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(0))", " Image "); 27 28 } 28 29 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-aria-button-alt-tag-expected.txt
r151924 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-aria-button-alt-tag.html
r155274 r204707 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 debug("imgUIElement.description is " + imgUIElement.description);25 shouldBeEqualToString("platformValueForW3CName(imgUIElement)", "alternate"); 25 26 } 26 27 </script> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-fallsback-to-title.html
r155274 r204707 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 debug("Image1 description: " + image1.description);32 debug( "Image1 help: " + image1.helpText + "<br>");32 debug("Image1:"); 33 debug(platformTextAlternatives(image1)); 33 34 34 35 // Second image should use the description from the alt tag instead of the title. 35 36 // The help text should reflect what's in the title. 36 37 var image2 = imagesGroup.childAtIndex(0).childAtIndex(1); 37 debug("Image2 description: " + image2.description);38 debug( "Image2 help: " + image2.helpText + "<br>");38 debug("Image2:"); 39 debug(platformTextAlternatives(image2)); 39 40 40 41 // Now do the same checks for ARIA type images. 41 42 var image3 = imagesGroup.childAtIndex(1); 42 debug("Image3 description: " + image3.description);43 debug( "Image3 help: " + image3.helpText + "<br>");43 debug("Image3:"); 44 debug(platformTextAlternatives(image3)); 44 45 45 46 // Now do the same checks for ARIA type images. 46 47 var image4 = imagesGroup.childAtIndex(2); 47 debug("Image4 description: " + image4.description);48 debug( "Image4 help: " + image4.helpText + "<br>");48 debug("Image4:"); 49 debug(platformTextAlternatives(image4)); 49 50 50 51 // Verify that the first image (with an empty alt tag) is ignored -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/input-image-alt-expected.txt
r151924 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/input-image-alt.html
r155274 r204707 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 debug("img.description is " + img.description); 20 shouldBeEqualToString("platformValueForW3CName(img)", "Submit"); 21 21 } 22 22 </script> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/loading-iframe-sends-notification.html
r160903 r204707 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> … … 55 56 window.accessibilityController.addNotificationListener(function (target, notification) { 56 57 // Ignore this notification if it's not on the iframe or not about the iframe being loaded. 57 if (target.description.indexOf("InnerFrame") == -1 58 59 var targetString = platformValueForW3CName(target); 60 if (targetString.indexOf("InnerFrame") == -1 58 61 || (notification != "AXLoadComplete" && notification != "AXLayoutComplete")) 59 62 return; -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/media-element.html
r155274 r204707 19 19 function dumpObject(axObject) 20 20 { 21 debug(indent(indentLevel) + "description: " + axObject.description); 21 if (accessibilityController.platformName == "atk") 22 debug(indent(indentLevel) + "title: " + axObject.title); 23 else 24 debug(indent(indentLevel) + "description: " + axObject.description); 22 25 debug(indent(indentLevel) + "role: " + axObject.role); 23 26 if (axObject.subrole && axObject.subrole != 'AXSubrole: ') debug(indent(indentLevel) + "subrole: " + axObject.subrole); -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/radio-button-title-label.html
r178255 r204707 40 40 var radio2 = accessibilityController.accessibleElementById("r2"); 41 41 titleUIElement = radio2.titleUIElement(); 42 shouldBe("radio2.description", "'AXDescription: LABEL2a'"); 43 shouldBe("radio2.title", "'AXTitle: '"); 42 if (accessibilityController.platformName == "atk") { 43 shouldBe("radio2.title", "'AXTitle: LABEL2a'"); 44 shouldBe("radio2.description", "'AXDescription: '"); 45 } else { 46 shouldBe("radio2.description", "'AXDescription: LABEL2a'"); 47 shouldBe("radio2.title", "'AXTitle: '"); 48 } 44 49 shouldBeTrue("!titleUIElement || titleUIElement.title == 'AXTitle: '"); 45 50 … … 47 52 var radio3 = accessibilityController.accessibleElementById("r3"); 48 53 titleUIElement = radio3.titleUIElement(); 49 shouldBe("radio3.description", "'AXDescription: radio3'"); 50 shouldBe("radio3.title", "'AXTitle: '"); 54 if (accessibilityController.platformName == "atk") { 55 shouldBe("radio3.title", "'AXTitle: radio3'"); 56 shouldBe("radio2.description", "'AXDescription: '"); 57 } else { 58 shouldBe("radio3.description", "'AXDescription: radio3'"); 59 shouldBe("radio3.title", "'AXTitle: '"); 60 } 51 61 shouldBeTrue("!titleUIElement || titleUIElement.title == 'AXTitle: '"); 52 62 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/self-referencing-aria-labelledby-expected.txt
r155601 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/self-referencing-aria-labelledby.html
r155601 r204707 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 shouldBe ("test.description", "'AXDescription: X Y Z'");44 shouldBeEqualToString("platformValueForW3CName(test)", "X Y Z"); 44 45 } 46 47 document.getElementById("content").style.visibility = "hidden"; 45 48 } 46 49 </script> -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-bounds.html
r155274 r204707 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"> … … 47 48 var face = container.childAtIndex(0); 48 49 debug('Face role: ' + face.role); 49 debug('Face label: ' + face.description);50 debug('Face label: ' + platformValueForW3CName(face, true)); 50 51 debug('FaceX: ' + (pageX(face) - x)); 51 52 debug('FaceY: ' + Math.abs(pageY(face) - y)); … … 54 55 var eye = container.childAtIndex(1); 55 56 debug('Eye role: ' + eye.role); 56 debug('Eye label: ' + eye.description);57 debug('Eye label: ' + platformValueForW3CName(eye, true)); 57 58 debug('EyeX: ' + (pageX(eye) - x)); 58 59 debug('EyeY: ' + Math.abs(pageY(eye) - y)); … … 61 62 var nose = container.childAtIndex(3); 62 63 debug('Nose role: ' + nose.role); 63 debug('Nose label: ' + nose.description);64 debug('Nose label: ' + platformValueForW3CName(nose, true)); 64 65 debug('NoseX: ' + (pageX(nose) - x)); 65 66 debug('NoseY: ' + Math.abs(pageY(nose) - y)); … … 68 69 var mouth = container.childAtIndex(4); 69 70 debug('Mouth role: ' + mouth.role); 70 debug('Mouth label: ' + mouth.description);71 debug('Mouth label: ' + platformValueForW3CName(mouth, true)); 71 72 debug('MouthX: ' + (pageX(mouth) - x)); 72 73 debug('MouthY: ' + Math.floor(Math.abs(pageY(mouth) - y))); … … 75 76 // Text varies by about 1 - 2 pixels depending on the platform, 76 77 // so just print the text coordinates divided by 10. 77 var text = container.childAtIndex(5).childAtIndex(0); 78 var text = container.childAtIndex(5); 79 if (accessibilityController.platformName != "atk") 80 text = text.childAtIndex(0); 78 81 debug('Text role: ' + text.role); 79 82 debug('TextX/10: ' + Math.floor((pageX(text) - x) / 10)); … … 83 86 var image = container.childAtIndex(6); 84 87 debug('Image role: ' + image.role); 85 debug('Image label: ' + image.description);88 debug('Image label: ' + platformValueForW3CName(image, true)); 86 89 debug('ImageX: ' + (pageX(image) - x)); 87 90 debug('ImageY: ' + Math.abs(pageY(image) - y)); -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-group-element-with-title-expected.txt
r147802 r204707 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. -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-group-element-with-title.html
r168313 r204707 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 shouldBe ("group1.description", "'AXDescription: SVG TITLE 1'");28 shouldBeEqualToString("platformValueForW3CName(group1)", "SVG TITLE 1"); 28 29 29 30 debug("\nVerify that you can hit-test to the SVG group."); -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-image-expected.txt
r168350 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-image.html
r155274 r204707 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 shouldBe("svgImage.description", "realImage.description"); 31 shouldBe("platformValueForW3CName(svgImage)", "platformValueForW3CName(realImage)"); 32 shouldBe("platformValueForW3CDescription(svgImage)", "platformValueForW3CDescription(realImage)"); 31 33 32 34 debug("SVG Image Role: " + svgImage.role); 33 debug("SVG Image Description: " + svgImage.description); 35 debug("SVG Image Accessible Name: " + platformValueForW3CName(svgImage)); 36 debug("SVG Image Accessible Description: " + platformValueForW3CDescription(svgImage)); 34 37 } 35 36 38 </script> 37 39 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-labelledby-expected.txt
r166917 r204707 5 5 6 6 7 SVG Element: AXDescription: Sudan 7 PASS platformValueForW3CName(image) is "Sudan" 8 8 PASS successfullyParsed is true 9 9 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-labelledby.html
r166917 r204707 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 debug("SVG Element: " + image.description);32 shouldBeEqualToString("platformValueForW3CName(image)", "Sudan"); 32 33 } 33 34 -
releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-remote-element.html
r155274 r204707 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" > … … 32 33 var face = container.childAtIndex(0); 33 34 debug('Face role: ' + face.role); 34 debug('Face label: ' + face.description);35 debug('Face label: ' + platformValueForW3CName(face, true)); 35 36 debug('FaceX: ' + (pageX(face) - x)); 36 37 debug('FaceY: ' + Math.abs(pageY(face) - y)); … … 39 40 var eye = container.childAtIndex(1); 40 41 debug('Eye role: ' + eye.role); 41 debug('Eye label: ' + eye.description);42 debug('Eye label: ' + platformValueForW3CName(eye, true)); 42 43 debug('EyeX: ' + (pageX(eye) - x)); 43 44 debug('EyeY: ' + Math.abs(pageY(eye) - y)); … … 46 47 var nose = container.childAtIndex(3); 47 48 debug('Nose role: ' + nose.role); 48 debug('Nose label: ' + nose.description);49 debug('Nose label: ' + platformValueForW3CName(nose, true)); 49 50 debug('NoseX: ' + (pageX(nose) - x)); 50 51 debug('NoseY: ' + Math.abs(pageY(nose) - y)); … … 53 54 var mouth = container.childAtIndex(4); 54 55 debug('Mouth role: ' + mouth.role); 55 debug('Mouth label: ' + mouth.description);56 debug('Mouth label: ' + platformValueForW3CName(mouth, true)); 56 57 debug('MouthX: ' + (pageX(mouth) - x)); 57 58 debug('MouthY: ' + Math.floor(Math.abs(pageY(mouth) - y))); -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations
r200841 r204707 84 84 # written in a platform-specific way. They should either be moved to 85 85 # the right platform or re-written in a more platform-agnostic way. 86 webkit.org/b/98348 accessibility/internal-link-anchors2.html [ WontFix Missing ] 86 87 87 # Things specific to AX API (at least at the moment) 88 88 webkit.org/b/98348 accessibility/radio-button-group-members.html [ Skip ] … … 1421 1421 webkit.org/b/132266 js/slow-stress/emscripten-memops.html [ Timeout Pass ] 1422 1422 1423 webkit.org/b/133148 accessibility/content-editable-as-textarea.html [ Crash Timeout ]1424 1423 webkit.org/b/133148 accessibility/content-editable-set-inner-text-generates-axvalue-notification.html [ Timeout ] 1425 1424 … … 1674 1673 webkit.org/b/42194 http/tests/security/drag-drop-same-unique-origin.html [ Failure ] 1675 1674 1676 webkit.org/b/106340 accessibility/img-fallsback-to-title.html [ Failure ]1677 1678 1675 # svg/ failures 1679 1676 webkit.org/b/42457 svg/custom/embedded-svg-allowed-in-dashboard.xml [ Failure ] … … 1796 1793 # Need platform specific update to test to make it run. 1797 1794 1798 webkit.org/b/98357 accessibility/aria-readonly.html [ Failure ]1799 1795 webkit.org/b/98359 accessibility/aria-text-role.html [ Failure ] 1800 1796 webkit.org/b/98363 accessibility/canvas-fallback-content-2.html [ Failure ] … … 1896 1892 Bug(GTK) sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.3/S15.9.3.1_A5_T5.html [ Failure ] 1897 1893 Bug(GTK) sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.3/S15.9.3.1_A5_T6.html [ Failure ] 1898 1899 # r65681 broke a couple GTK+ a11y tests1900 webkit.org/b/44316 accessibility/gtk/object-attributes.html [ Failure ]1901 webkit.org/b/44316 accessibility/gtk/title-and-alt.html [ Failure ]1902 1894 1903 1895 # Expose title direction in WebKit API … … 2192 2184 # Test globally skipped, passing on GTK port 2193 2185 webkit.org/b/124349 fast/hidpi/image-srcset-relative-svg-canvas.html [ Pass ] 2194 2195 webkit.org/b/131496 accessibility/help-text.html [ Failure ]2196 2186 2197 2187 webkit.org/b/131498 fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html [ ImageOnlyFailure ] … … 2636 2626 webkit.org/b/153941 fast/text/control-characters/visible-control-characters-3.xhtml [ ImageOnlyFailure Pass ] 2637 2627 2638 webkit.org/b/153956 accessibility/gtk/caret-offsets.html [ Failure ]2639 2640 2628 #//////////////////////////////////////////////////////////////////////////////////////// 2641 2629 # End of non-crashing, non-flaky tests failing -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt
r204706 r204707 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 Group8 Label element role is: AXRole: AXLabel 10 9 PASS successfullyParsed is true 11 10 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/aria-switch-text-expected.txt
r189467 r204707 13 13 widget.description is AXDescription: 14 14 widget.childrenCount is 0 15 widget.title is AXTitle: Three16 widget.description is AXDescription: foo15 widget.title is AXTitle: foo 16 widget.description is AXDescription: 17 17 widget.childrenCount is 0 18 18 PASS successfullyParsed is true -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/aria-text-role-expected.txt
r204706 r204707 5 5 6 6 7 PASS textrole.role is 'AXRole: AXStatic Text'7 PASS textrole.role is 'AXRole: AXStatic' 8 8 PASS textrole.stringValue is 'AXValue: all at once' 9 9 PASS textrole.elementAtPoint(x, y).isEqual(textrole) is true -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/canvas-description-and-role-expected.txt
r204706 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/empty-image-with-title-expected.txt
r204706 r204707 6 6 7 7 image1.role is AXRole: AXImage 8 image1 .description is AXDescription: baz8 image1's accessible name with source is AXTitle: baz 9 9 PASS successfullyParsed is true 10 10 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-link-expected.txt
r193841 r204707 7 7 AXParent: AXSection 8 8 AXChildren: 1 9 AXPosition: { 8.000000, 9 8.000000 }10 AXSize: { 280.000000, 21 3.000000 }9 AXPosition: { 8.000000, 97.000000 } 10 AXSize: { 280.000000, 214.000000 } 11 11 AXTitle: Delicious cake 12 12 AXDescription: … … 28 28 AXParent: AXLink: Delicious cake 29 29 AXChildren: 0 30 AXPosition: { 8.000000, 9 9.000000 }30 AXPosition: { 8.000000, 98.000000 } 31 31 AXSize: { 280.000000, 210.000000 } 32 32 AXTitle: Delicious cake 33 AXDescription: Delicious cake33 AXDescription: 34 34 AXFocusable: 0 35 35 AXFocused: 0 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-map1-expected.txt
r189467 r204707 7 7 Link1 role: AXRole: AXLink 8 8 Link1 title: AXTitle: Link1 9 Link1 description: AXDescription: Link19 Link1 description: AXDescription: 10 10 11 11 Link2 role: AXRole: AXLink 12 12 Link2 title: AXTitle: Link2 13 Link2 description: AXDescription: Link213 Link2 description: AXDescription: 14 14 15 15 Link3 role: AXRole: AXLink 16 16 Link3 title: AXTitle: Link3 17 Link3 description: AXDescription: Link317 Link3 description: AXDescription: 18 18 19 19 PASS successfullyParsed is true -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt
r189467 r204707 26 26 AXSize: { 123.000000, 62.000000 } 27 27 AXTitle: Link1 28 AXDescription: Link128 AXDescription: 29 29 AXValue: 30 30 AXFocusable: 0 … … 46 46 AXSize: { 122.000000, 14.000000 } 47 47 AXTitle: Link2 48 AXDescription: Link248 AXDescription: 49 49 AXValue: 50 50 AXFocusable: 0 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-with-alt-and-map-expected.txt
r193841 r204707 8 8 AXRole: AXWebArea AXTitle: AXDescription: 9 9 AXRole: AXSection AXTitle: AXDescription: 10 AXRole: AXImageMap AXTitle: foo bar baz AXDescription: foo bar baz11 AXRole: AXLink AXTitle: foo AXDescription: foo12 AXRole: AXLink AXTitle: bar AXDescription: bar13 AXRole: AXLink AXTitle: baz AXDescription: baz10 AXRole: AXImageMap AXTitle: foo bar baz AXDescription: 11 AXRole: AXLink AXTitle: foo AXDescription: 12 AXRole: AXLink AXTitle: bar AXDescription: 13 AXRole: AXLink AXTitle: baz AXDescription: 14 14 PASS successfullyParsed is true 15 15 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/img-fallsback-to-title-expected.txt
r189467 r204707 1 2 test 1 test 3 2 test 4 3 This tests that images will fallback to using the title attribute if no other descriptive text is present. … … 7 6 8 7 9 Image1 description: AXDescription: test110 Image1 help: AXHelp: 11 12 Image2 description: AXDescription: test213 Image2 help: AXHelp: test2 14 15 Image3 description: AXDescription: test316 Image3 help: AXHelp: 17 18 Image4 description: AXDescription: alt19 Image4 help: AXHelp: test4 20 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 21 20 PASS imagesGroup.childAtIndex(0).childrenCount is 2 22 21 PASS successfullyParsed is true -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/math-multiscript-attributes-expected.txt
r189467 r204707 31 31 AXParent: AXSection 32 32 AXChildren: 0 33 AXPosition: { 3 3.000000, -14.000000 }33 AXPosition: { 32.000000, -15.000000 } 34 34 AXSize: { 11.000000, 81.000000 } 35 35 AXTitle: … … 50 50 AXParent: AXSection 51 51 AXChildren: 0 52 AXPosition: { 3 3.000000, -26.000000 }52 AXPosition: { 32.000000, -26.000000 } 53 53 AXSize: { 11.000000, 80.000000 } 54 54 AXTitle: … … 69 69 AXParent: AXSection 70 70 AXChildren: 0 71 AXPosition: { 9.000000, -1 4.000000 }71 AXPosition: { 9.000000, -15.000000 } 72 72 AXSize: { 10.000000, 81.000000 } 73 73 AXTitle: -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/media-element-expected.txt
r189467 r204707 6 6 State at 'canplaythrough' event: 7 7 8 description: AXDescription:8 title: AXTitle: 9 9 role: AXRole: AXVideo 10 10 11 11 12 description: AXDescription: Video Playback12 title: AXTitle: Video Playback 13 13 role: AXRole: AXToolbar 14 14 15 15 16 description: AXDescription: Play16 title: AXTitle: Play 17 17 role: AXRole: AXButton 18 18 19 19 20 description: AXDescription: Duration20 title: AXTitle: Duration 21 21 role: AXRole: AXSlider 22 22 23 23 24 description: AXDescription: Remaining24 title: AXTitle: Remaining 25 25 role: AXRole: AXTimer 26 26 27 27 28 description: AXDescription: Display Full Screen28 title: AXTitle: Display Full Screen 29 29 role: AXRole: AXButton 30 30 31 31 32 description: AXDescription: Mute32 title: AXTitle: Mute 33 33 role: AXRole: AXButton 34 34 35 35 36 description: AXDescription: Volume36 title: AXTitle: Volume 37 37 role: AXRole: AXSlider 38 38 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/radio-button-title-label-expected.txt
r189467 r204707 6 6 PASS radio1.title is 'AXTitle: LABEL' 7 7 PASS titleUIElement.isEqual(accessibilityController.accessibleElementById('label1')) is true 8 PASS radio2. description is 'AXDescription: LABEL2a'9 PASS radio2. title is 'AXTitle: '8 PASS radio2.title is 'AXTitle: LABEL2a' 9 PASS radio2.description is 'AXDescription: ' 10 10 PASS !titleUIElement || titleUIElement.title == 'AXTitle: ' is true 11 PASS radio3. description is 'AXDescription: radio3'12 PASS radio 3.title is 'AXTitle: '11 PASS radio3.title is 'AXTitle: radio3' 12 PASS radio2.description is 'AXDescription: ' 13 13 PASS !titleUIElement || titleUIElement.title == 'AXTitle: ' is true 14 14 PASS successfullyParsed is true -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt
r195827 r204707 12 12 AXParent: AXRow 13 13 AXChildren: 0 14 AXPosition: { 23 5.000000, 26.000000 }14 AXPosition: { 234.000000, 26.000000 } 15 15 AXSize: { 144.000000, 63.000000 } 16 16 AXTitle: … … 31 31 AXParent: AXRow 32 32 AXChildren: 0 33 AXPosition: { 23 5.000000, 26.000000 }33 AXPosition: { 234.000000, 26.000000 } 34 34 AXSize: { 144.000000, 63.000000 } 35 35 AXTitle: … … 50 50 AXParent: AXRow 51 51 AXChildren: 0 52 AXPosition: { 37 8.000000, 26.000000 }52 AXPosition: { 377.000000, 26.000000 } 53 53 AXSize: { 70.000000, 63.000000 } 54 54 AXTitle: … … 69 69 AXParent: AXRow 70 70 AXChildren: 0 71 AXPosition: { 44 7.000000, 26.000000 }71 AXPosition: { 446.000000, 26.000000 } 72 72 AXSize: { 120.000000, 29.000000 } 73 73 AXTitle: … … 88 88 AXParent: AXRow 89 89 AXChildren: 0 90 AXPosition: { 44 7.000000, 26.000000 }90 AXPosition: { 446.000000, 26.000000 } 91 91 AXSize: { 120.000000, 29.000000 } 92 92 AXTitle: -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-cell-spans-expected.txt
r195827 r204707 56 56 AXParent: AXRow 57 57 AXChildren: 0 58 AXPosition: { 14 7.000000, 84.000000 }58 AXPosition: { 146.000000, 84.000000 } 59 59 AXSize: { 124.000000, 58.000000 } 60 60 AXTitle: … … 78 78 AXParent: AXRow 79 79 AXChildren: 0 80 AXPosition: { 14 7.000000, 84.000000 }80 AXPosition: { 146.000000, 84.000000 } 81 81 AXSize: { 124.000000, 58.000000 } 82 82 AXTitle: … … 100 100 AXParent: AXRow 101 101 AXChildren: 0 102 AXPosition: { 51 6.000000, 84.000000 }102 AXPosition: { 515.000000, 84.000000 } 103 103 AXSize: { 124.000000, 29.000000 } 104 104 AXTitle: -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt
r195827 r204707 14 14 AXParent: AXRow 15 15 AXChildren: 0 16 AXPosition: { 23 5.000000, 26.000000 }16 AXPosition: { 234.000000, 26.000000 } 17 17 AXSize: { 144.000000, 63.000000 } 18 18 AXTitle: … … 34 34 AXParent: AXRow 35 35 AXChildren: 0 36 AXPosition: { 44 7.000000, 55.000000 }36 AXPosition: { 446.000000, 55.000000 } 37 37 AXSize: { 53.000000, 34.000000 } 38 38 AXTitle: -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-detection-expected.txt
r201270 r204707 5 5 AXParent: AXWebArea 6 6 AXChildren: 2 7 AXPosition: { 8.000000, 6 6.000000 }7 AXPosition: { 8.000000, 65.000000 } 8 8 AXSize: { 62.000000, 45.000000 } 9 9 AXTitle: … … 28 28 AXParent: AXWebArea 29 29 AXChildren: 1 30 AXPosition: { 8.000000, 48 4.000000 }30 AXPosition: { 8.000000, 483.000000 } 31 31 AXSize: { 68.000000, 28.000000 } 32 32 AXTitle: … … 117 117 AXParent: AXWebArea 118 118 AXChildren: 2 119 AXPosition: { 8.000000, 33 3.000000 }119 AXPosition: { 8.000000, 332.000000 } 120 120 AXSize: { 58.000000, 41.000000 } 121 121 AXTitle: … … 140 140 AXParent: AXWebArea 141 141 AXChildren: 1 142 AXPosition: { 8.000000, 33 3.000000 }142 AXPosition: { 8.000000, 332.000000 } 143 143 AXSize: { 58.000000, 22.000000 } 144 144 AXTitle: … … 162 162 AXParent: AXWebArea 163 163 AXChildren: 0 164 AXPosition: { 8.000000, 33 3.000000 }164 AXPosition: { 8.000000, 332.000000 } 165 165 AXSize: { 26.000000, 18.000000 } 166 166 AXTitle: … … 230 230 AXParent: AXWebArea 231 231 AXChildren: 0 232 AXPosition: { 8.000000, 34 6.000000 }232 AXPosition: { 8.000000, 345.000000 } 233 233 AXSize: { 769.000000, 27.000000 } 234 234 AXTitle: … … 253 253 AXParent: AXWebArea 254 254 AXChildren: 1 255 AXPosition: { 8.000000, 34 6.000000 }255 AXPosition: { 8.000000, 345.000000 } 256 256 AXSize: { 130.000000, 18.000000 } 257 257 AXTitle: … … 282 282 AXParent: AXWebArea 283 283 AXChildren: 1 284 AXPosition: { 8.000000, 33 3.000000 }284 AXPosition: { 8.000000, 332.000000 } 285 285 AXSize: { 64.000000, 26.000000 } 286 286 AXTitle: … … 376 376 AXParent: AXWebArea 377 377 AXChildren: 3 378 AXPosition: { 8.000000, 33 3.000000 }378 AXPosition: { 8.000000, 332.000000 } 379 379 AXSize: { 64.000000, 68.000000 } 380 380 AXTitle: … … 400 400 AXParent: AXWebArea 401 401 AXChildren: 2 402 AXPosition: { 8.000000, 33 3.000000 }402 AXPosition: { 8.000000, 332.000000 } 403 403 AXSize: { 62.000000, 45.000000 } 404 404 AXTitle: -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-sections-expected.txt
r195827 r204707 21 21 AXParent: AXRow 22 22 AXChildren: 0 23 AXPosition: { 36 3.000000, 60.000000 }23 AXPosition: { 362.000000, 60.000000 } 24 24 AXSize: { 21.000000, 29.000000 } 25 25 AXTitle: … … 40 40 AXParent: AXRow 41 41 AXChildren: 0 42 AXPosition: { 38 3.000000, 60.000000 }42 AXPosition: { 382.000000, 60.000000 } 43 43 AXSize: { 28.000000, 29.000000 } 44 44 AXTitle: … … 59 59 AXParent: AXRow 60 60 AXChildren: 0 61 AXPosition: { 4 10.000000, 60.000000 }61 AXPosition: { 409.000000, 60.000000 } 62 62 AXSize: { 29.000000, 29.000000 } 63 63 AXTitle: -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/canvas-description-and-role-expected.txt
r127084 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/img-fallsback-to-title-expected.txt
r152388 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/platform/win/accessibility/canvas-description-and-role-expected.txt
r179026 r204707 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 -
releases/WebKitGTK/webkit-2.12/LayoutTests/resources/accessibility-helper.js
r184213 r204707 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 } -
releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog
r201285 r204707 1 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 3 AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description 4 https://bugs.webkit.org/show_bug.cgi?id=157822 5 6 Reviewed by Chris Fleizach. 7 8 Remove the old code which was overriding WebCore Accessibility and always use 9 AccessibilityText. 10 11 If the AccessibilityText's textSource is HelpText or SummaryText, it should be exposed 12 as the AtkObject description. If the textSource is TitleTagText and there is no other 13 text alternative, the value should also be exposed in this fashion. Note that AtkObject's 14 description property is equivalent to AXAPI's AXHelp property. 15 16 If the AccessibilityText's textSource is anything other than the above, the first 17 non-empty value should be exposed as the AtkObject name. Depending on the source of 18 the name content, AtkObject's name property can be the equivalent of AXAPI's AXTitle. 19 However, most of the time, AtkObject's name property is equivalent to AXAPI's 20 AXDescription property. 21 22 By making these changes, what WebKit exposes for ATK is now extremely similar to what 23 WebKit exposes on the Mac (modulo the property names) and also with what is defined in 24 the HTML Accessibility and Accessible Name and Description Computation API mappings specs. 25 26 Now that the exposure is correct, the Layout Tests needed to be adjusted accordingly because 27 asking for the "AXDescription" gives you the AXDescription on the Mac and the AtkObject 28 description in GNU/Linux. But as indicated above, what ATK calls a "description" is what 29 the Mac calls "help." 30 31 Ultimately our Layout Tests and/or our platform TestRunner API should be modified to deal 32 with these differences more gracefully. (Bug https://bugs.webkit.org/show_bug.cgi?id=157187 33 has been opened for that task.) In the meantime, the existing tests have been given platform 34 checks to ask for the right property on each platform. This was done in such a way as to not 35 require other (non-ATK) platforms change their current expectations files. 36 37 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: 38 (webkitAccessibleGetName): 39 (webkitAccessibleGetDescription): 40 1 41 2016-03-17 Brent Fulgham <bfulgham@apple.com> 2 42 -
releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r201270 r204707 109 109 returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(object), 0); 110 110 111 AccessibilityObject* coreObject = core(object); 112 if (coreObject->isFieldset()) { 113 AccessibilityObject* label = coreObject->titleUIElement(); 114 if (label) { 115 AtkObject* atkObject = label->wrapper(); 116 if (ATK_IS_TEXT(atkObject)) 117 return atk_text_get_text(ATK_TEXT(atkObject), 0, -1); 118 } 119 } 120 121 if (coreObject->isControl()) { 122 AccessibilityObject* label = coreObject->correspondingLabelForControlElement(); 123 if (label) { 124 AtkObject* atkObject = label->wrapper(); 125 if (ATK_IS_TEXT(atkObject)) 126 return atk_text_get_text(ATK_TEXT(atkObject), 0, -1); 127 } 128 129 // Try text under the node. 130 String textUnder = coreObject->textUnderElement(); 131 if (textUnder.length()) 132 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleName, textUnder); 133 } 134 135 if (coreObject->isImage() || coreObject->isInputImage() || coreObject->isImageMap() || coreObject->isImageMapLink()) { 136 Node* node = coreObject->node(); 137 if (is<HTMLElement>(node)) { 138 // Get the attribute rather than altText String so as not to fall back on title. 139 const AtomicString& alt = downcast<HTMLElement>(*node).getAttribute(HTMLNames::altAttr); 140 if (!alt.isEmpty()) 141 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleName, alt); 142 } 143 } 144 145 // Fallback for the webArea object: just return the document's title. 146 if (coreObject->isWebArea()) { 147 Document* document = coreObject->document(); 148 if (document) 149 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleName, document->title()); 150 } 151 152 // Nothing worked so far, try with the AccessibilityObject's 153 // title() before going ahead with stringValue(). 154 String axTitle = accessibilityTitle(coreObject); 155 if (!axTitle.isEmpty()) 156 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleName, axTitle); 157 158 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleName, coreObject->stringValue()); 111 Vector<AccessibilityText> textOrder; 112 core(object)->accessibilityText(textOrder); 113 114 for (const auto& text : textOrder) { 115 // FIXME: This check is here because AccessibilityNodeObject::titleElementText() 116 // appends an empty String for the LabelByElementText source when there is a 117 // titleUIElement(). Removing this check makes some fieldsets lose their name. 118 if (text.text.isEmpty()) 119 continue; 120 121 // WebCore Accessibility should provide us with the text alternative computation 122 // in the order defined by that spec. So take the first thing that our platform 123 // does not expose via the AtkObject description. 124 if (text.textSource != HelpText && text.textSource != SummaryText) 125 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleName, text.text); 126 } 127 128 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleName, ""); 159 129 } 160 130 … … 164 134 returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(object), 0); 165 135 166 AccessibilityObject* coreObject = core(object); 167 Node* node = nullptr; 168 if (coreObject->isAccessibilityRenderObject()) 169 node = coreObject->node(); 170 if (!is<HTMLElement>(node) || coreObject->ariaRoleAttribute() != UnknownRole || coreObject->isImage()) 171 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleDescription, accessibilityDescription(coreObject)); 172 173 // atk_table_get_summary returns an AtkObject. We have no summary object, so expose summary here. 174 if (coreObject->roleValue() == TableRole) { 175 const AtomicString& summary = downcast<HTMLTableElement>(*node).summary(); 176 if (!summary.isEmpty()) 177 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleDescription, summary); 178 } 179 180 // The title attribute should be reliably available as the object's descripton. 181 // We do not want to fall back on other attributes in its absence. See bug 25524. 182 String title = downcast<HTMLElement>(*node).title(); 183 if (!title.isEmpty()) 184 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleDescription, title); 185 186 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleDescription, accessibilityDescription(coreObject)); 136 Vector<AccessibilityText> textOrder; 137 core(object)->accessibilityText(textOrder); 138 139 bool nameTextAvailable = false; 140 for (const auto& text : textOrder) { 141 // WebCore Accessibility should provide us with the text alternative computation 142 // in the order defined by that spec. So take the first thing that our platform 143 // does not expose via the AtkObject name. 144 if (text.textSource == HelpText || text.textSource == SummaryText) 145 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleDescription, text.text); 146 147 // If there is no other text alternative, the title tag contents will have been 148 // used for the AtkObject name. We don't want to duplicate it here. 149 if (text.textSource == TitleTagText && nameTextAvailable) 150 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleDescription, text.text); 151 152 nameTextAvailable = true; 153 } 154 155 return cacheAndReturnAtkProperty(object, AtkCachedAccessibleDescription, ""); 187 156 } 188 157 -
releases/WebKitGTK/webkit-2.12/Tools/ChangeLog
r201270 r204707 1 2016-05-25 Joanmarie Diggs <jdiggs@igalia.com> 2 3 AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description 4 https://bugs.webkit.org/show_bug.cgi?id=157822 5 6 Reviewed by Chris Fleizach. 7 8 Fix AccessibilityUIElement::helpText() so that it returns an empty string rather than 9 nullptr upon failure. 10 11 * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: 12 (WTR::AccessibilityUIElement::helpText): 13 1 14 2016-05-11 Joanmarie Diggs <jdiggs@igalia.com> 2 15 -
releases/WebKitGTK/webkit-2.12/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
r201270 r204707 1218 1218 AtkRelationSet* relationSet = atk_object_ref_relation_set(ATK_OBJECT(m_element.get())); 1219 1219 if (!relationSet) 1220 return nullptr;1220 return JSStringCreateWithCharacters(0, 0); 1221 1221 1222 1222 AtkRelation* relation = atk_relation_set_get_relation_by_type(relationSet, ATK_RELATION_DESCRIBED_BY); 1223 1223 if (!relation) 1224 return nullptr;1224 return JSStringCreateWithCharacters(0, 0); 1225 1225 1226 1226 GPtrArray* targetList = atk_relation_get_target(relation); 1227 1227 if (!targetList || !targetList->len) 1228 return nullptr;1228 return JSStringCreateWithCharacters(0, 0); 1229 1229 1230 1230 StringBuilder builder;
Note: See TracChangeset
for help on using the changeset viewer.