Changeset 204707 in webkit


Ignore:
Timestamp:
Aug 22, 2016 6:04:05 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r201072, r201216 - AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description
https://bugs.webkit.org/show_bug.cgi?id=157822

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2016-05-25
Reviewed by Chris Fleizach.

Remove the old code which was overriding WebCore Accessibility and always use
AccessibilityText.

If the AccessibilityText's textSource is HelpText or SummaryText, it should be exposed
as the AtkObject description. If the textSource is TitleTagText and there is no other
text alternative, the value should also be exposed in this fashion. Note that AtkObject's
description property is equivalent to AXAPI's AXHelp property.

If the AccessibilityText's textSource is anything other than the above, the first
non-empty value should be exposed as the AtkObject name. Depending on the source of
the name content, AtkObject's name property can be the equivalent of AXAPI's AXTitle.
However, most of the time, AtkObject's name property is equivalent to AXAPI's
AXDescription property.

By making these changes, what WebKit exposes for ATK is now extremely similar to what
WebKit exposes on the Mac (modulo the property names) and also with what is defined in
the HTML Accessibility and Accessible Name and Description Computation API mappings specs.

Now that the exposure is correct, the Layout Tests needed to be adjusted accordingly because
asking for the "AXDescription" gives you the AXDescription on the Mac and the AtkObject
description in GNU/Linux. But as indicated above, what ATK calls a "description" is what
the Mac calls "help."

Ultimately our Layout Tests and/or our platform TestRunner API should be modified to deal
with these differences more gracefully. (Bug https://bugs.webkit.org/show_bug.cgi?id=157187
has been opened for that task.) In the meantime, the existing tests have been given platform
checks to ask for the right property on each platform. This was done in such a way as to not
require other (non-ATK) platforms change their current expectations files.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetName):
(webkitAccessibleGetDescription):

Tools:
AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description
https://bugs.webkit.org/show_bug.cgi?id=157822

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2016-05-25
Reviewed by Chris Fleizach.

Fix AccessibilityUIElement::helpText() so that it returns an empty string rather than
nullptr upon failure.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::helpText):

LayoutTests:
AX: Layout tests related to text alternative computation need to be done differently
https://bugs.webkit.org/show_bug.cgi?id=157187

Create several utility methods to facilitate retrieval of platform-independent
attribute values from platform-specific attributes:

  • platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.)
  • platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself.
  • platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired.

Begin using these methods in the tests related to text alternative computation
which had platform-specific checks and update the expectations files.

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2016-05-25
Reviewed by Chris Fleizach.

  • accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated.
  • accessibility/alt-tag-on-image-with-nonimage-role.html: Updated.
  • accessibility/aria-help-expected.txt: Added.
  • accessibility/aria-help.html: Updated.
  • accessibility/aria-label-expected.txt: Updated.
  • accessibility/aria-label.html: Updated.
  • accessibility/aria-labeled-with-hidden-node-expected.txt: Updated.
  • accessibility/aria-labeled-with-hidden-node.html: Updated.
  • accessibility/aria-labelledby-on-input-expected.txt: Updated.
  • accessibility/aria-labelledby-on-input.html: Updated.
  • accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated.
  • accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated.
  • accessibility/aria-labelledby-overrides-label-expected.txt: Updated.
  • accessibility/aria-labelledby-overrides-label.html: Updated.
  • accessibility/aria-labelledby-stay-within-expected.txt: Updated.
  • accessibility/aria-labelledby-stay-within.html: Updated.
  • accessibility/aria-labelledby-with-descendants-expected.txt: Updated.
  • accessibility/aria-labelledby-with-descendants.html: Updated.
  • accessibility/aria-namefrom-author-expected.txt: Updated.
  • accessibility/aria-namefrom-author.html: Updated.
  • accessibility/aria-text-role-expected.txt: Updated.
  • accessibility/aria-text-role.html: Updated.
  • accessibility/canvas-description-and-role-expected.txt: Updated.
  • accessibility/canvas-description-and-role.html: Updated.
  • accessibility/canvas-fallback-content.html: Updated.
  • accessibility/empty-image-with-title-expected.txt: Updated.
  • accessibility/empty-image-with-title.html: Updated.
  • accessibility/fieldset-element-expected.txt: Updated.
  • accessibility/fieldset-element.html: Updated.
  • accessibility/focusable-div-expected.txt: Updated.
  • accessibility/focusable-div.html: Updated.
  • accessibility/help-text.html: Updated.
  • accessibility/img-alt-tag-only-whitespace-expected.txt: Updated.
  • accessibility/img-alt-tag-only-whitespace.html: Updated.
  • accessibility/img-aria-button-alt-tag-expected.txt: Updated.
  • accessibility/img-aria-button-alt-tag.html: Updated.
  • accessibility/img-fallsback-to-title.html: Updated.
  • accessibility/input-image-alt-expected.txt: Updated.
  • accessibility/input-image-alt.html: Updated.
  • accessibility/loading-iframe-sends-notification.html: Updated.
  • accessibility/self-referencing-aria-labelledby-expected.txt: Updated.
  • accessibility/self-referencing-aria-labelledby.html: Updated.
  • accessibility/svg-bounds.html: Updated.
  • accessibility/svg-group-element-with-title-expected.txt: Updated.
  • accessibility/svg-group-element-with-title.html: Updated.
  • accessibility/svg-image-expected.txt: Updated.
  • accessibility/svg-image.html: Updated.
  • accessibility/svg-labelledby-expected.txt: Updated.
  • accessibility/svg-labelledby.html: Updated.
  • accessibility/svg-remote-element.html: Updated.
  • accessibility/w3c-svg-description-calculation.html: Updated.
  • accessibility/w3c-svg-name-calculation.html: Updated.
  • platform/gtk/TestExpectations: Updated.
  • platform/gtk/accessibility/aria-hidden-negates-no-visibility-expected.txt: Added.
  • platform/gtk/accessibility/aria-labelledby-overrides-aria-label-expected.txt: Added.
  • platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Added.
  • platform/gtk/accessibility/aria-option-role-expected.txt: Added.
  • platform/gtk/accessibility/aria-switch-text-expected.txt: Updated.
  • platform/gtk/accessibility/aria-text-role-expected.txt: Added.
  • platform/gtk/accessibility/canvas-description-and-role-expected.txt: Added.
  • platform/gtk/accessibility/empty-image-with-title-expected.txt: Added.
  • platform/gtk/accessibility/help-text-expected.txt: Added.
  • platform/gtk/accessibility/image-link-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/image-map1-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/image-map2-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/image-with-alt-and-map-expected.txt: Updated.
  • platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated.
  • platform/gtk/accessibility/math-multiscript-attributes-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/media-element-expected.txt: Updated.
  • platform/gtk/accessibility/radio-button-title-label-expected.txt: Updated.
  • platform/gtk/accessibility/svg-bounds-expected.txt: Added.
  • platform/gtk/accessibility/svg-remote-element-expected.txt: Added.
  • platform/gtk/accessibility/table-attributes-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/table-cell-spans-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/table-cells-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/table-detection-expected.txt: Updated (Gardening).
  • platform/gtk/accessibility/table-sections-expected.txt: Updated (Gardening).
  • platform/mac/accessibility/aria-help-expected.txt: Removed.
  • platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated.
  • platform/mac/accessibility/fieldset-element-expected.txt: Removed.
  • platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated.
  • platform/win/accessibility/canvas-description-and-role-expected.txt: Updated.
  • resources/accessibility-helper.js:

(platformValueForW3CName): Added.
(platformValueForW3CDescription): Added.
(platformTextAlternatives): Added.
(platformRoleForComboBox): Added.
(platformRoleForStaticText): Added.

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  
     12016-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
    11212016-03-23  Michael Saboff  <msaboff@apple.com>
    2122
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt

    r160311 r204707  
    11   
    2 This tests that setting a role on an img still allows the alt attribute to be used for the description..
     2This tests the alternative text calculation when setting a role on an img with an alt attribute.
    33
    44On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     
    66
    77PASS text.stringValue is 'AXValue: TEST1'
    8 PASS group.description is 'AXDescription: TEST2'
    9 PASS button.description is 'AXDescription: TEST3'
     8PASS platformValueForW3CName(group) is "TEST2"
     9PASS platformValueForW3CName(button) is "TEST3"
    1010PASS successfullyParsed is true
    1111
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/alt-tag-on-image-with-nonimage-role.html

    r160311 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    1718<script>
    1819
    19     description("This tests that 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.");
    2021
    2122    if (window.accessibilityController) {
     
    2526
    2627        var group = accessibilityController.accessibleElementById("group");
    27         shouldBe("group.description", "'AXDescription: TEST2'");
     28        var button = accessibilityController.accessibleElementById("button");
    2829
    29         var button = accessibilityController.accessibleElementById("button");
    30         shouldBe("button.description", "'AXDescription: TEST3'");
     30        shouldBeEqualToString("platformValueForW3CName(group)", "TEST2");
     31        shouldBeEqualToString("platformValueForW3CName(button)", "TEST3");
    3132    }
    3233
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-help-expected.txt

    r204706 r204707  
    1 button
    21This tests that aria-help attribute works as expected.
    32
     
    54
    65
    7 FAIL button.helpText should be AXHelp: click here (of type string). Was null (of type object).
     6PASS platformValueForW3CName(axButton) is "title"
     7PASS platformValueForW3CDescription(axButton) is "click here"
    88PASS successfullyParsed is true
    99
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-help.html

    r159128 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
    7 
     8<div id="content">
    89<div id="button" tabindex=0 role="button" aria-label="title" aria-help="click here">
    910button
    1011</div>
    11 
     12</div>
    1213<p id="description"></p>
    1314<div id="console"></div>
     
    1819
    1920    if (window.accessibilityController) {
     21        document.getElementById("button").focus();
     22        var axButton = accessibilityController.focusedElement;
     23        shouldBeEqualToString("platformValueForW3CName(axButton)", "title");
     24        shouldBeEqualToString("platformValueForW3CDescription(axButton)", "click here");
    2025
    21         document.getElementById("button").focus();
    22         var button = accessibilityController.focusedElement;
    23         shouldBe("button.helpText", "'AXHelp: click here'");
     26        document.getElementById("content").style.visibility = "hidden";
    2427    }
    25 
    2628</script>
    2729
  • 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.
     1This tests that the aria-label attribute works on both an input and an anchor.
    32
    43On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    54
    65
    7 PASS succeeded is true
    8 PASS succeeded is true
     6PASS platformValueForW3CName(axInput) is "aria label"
     7PASS platformValueForW3CName(axLink) is "aria link"
    98PASS successfullyParsed is true
    109
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-label.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     8<div id="content">
    79<input aria-label="aria label" type="text" size=20>
    810<a href="#" aria-label="aria link">test</a>
     11</div>
    912<p id="description"></p>
    1013<div id="console"></div>
     
    1215<script>
    1316
    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.");
    1518
    1619    if (window.accessibilityController) {
     
    1821          var body = document.getElementById("body");
    1922          body.focus();
    20           var obj = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
    21           var succeeded = obj.description == "AXDescription: aria label";
    22           shouldBe("succeeded", "true");
    2323
    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";
    2731    }
    28 
    2932</script>
    3033
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labeled-with-hidden-node-expected.txt

    r157221 r204707  
    1 Go
    21This tests that if try to use a non-rendered node as your labelledby element, it won't crash and it will work.
    32
     
    54
    65
    7 PASS button.description is 'AXDescription: TITLE'
     6PASS platformValueForW3CName(button) is "TITLE"
    87PASS successfullyParsed is true
    98
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labeled-with-hidden-node.html

    r157221 r204707  
    44<head>
    55<script src="../resources/js-test-pre.js"></script>
     6<script src="../resources/accessibility-helper.js"></script>
    67</head>
    78<body>
    8 
     9<div id="content">
    910<button id="button" aria-labelledby="title">Go</button>
    10 
     11</div>
    1112
    1213<p id="description"></p>
     
    1819    if (window.accessibilityController) {
    1920       var button = accessibilityController.accessibleElementById("button");
    20        shouldBe("button.description", "'AXDescription: TITLE'");
     21       shouldBeEqualToString("platformValueForW3CName(button)", "TITLE");
     22
     23       document.getElementById("content").style.visibility = "hidden";
    2124    }
    2225</script>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-on-input-expected.txt

    r114362 r204707  
    1 This computer will self-destruct in   minutes.
     1This verifies the accessible name of an input with multiple aria-labelledby elements.
    22
    3 The accessibility description is "AXDescription: This computer will self-destruct in 10 minutes."
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
     5
     6PASS platformValueForW3CName(axInput) is "This computer will self-destruct in 10 minutes."
     7PASS successfullyParsed is true
     8
     9TEST COMPLETE
     10
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-on-input.html

    r120111 r204707  
     1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    12<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>
    67<body>
     8<div id="content">
    79    <span id="message">This computer will self-destruct in</span>
    810    <input id="time" type="text" value="10" aria-labelledby="message time unit"/>
    911    <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>
    2025</body>
    2126</html>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt

    r159482 r204707  
    44
    55
    6 PASS linkDescription is 'AXDescription: Y Z'
     6PASS platformValueForW3CName(axLink) is "Y Z"
    77PASS successfullyParsed is true
    88
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-overrides-aria-labeledby.html

    r159482 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56<title>aria-labelledby Overrides aria-labeledby</title>
    67</head>
     
    2425   
    2526    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
    3030        // Hide superfluous text.
    3131        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  minutes
    21This tests that if aria-labelledby is used, then label elements are not used
    32
     
    54
    65
    7 text.description is AXDescription: Shut down computer after 10 minutes
     6PASS platformValueForW3CName(text) is "Shut down computer after 10 minutes"
    87PASS text.titleUIElement() != null && text.titleUIElement().isValid is false
    9 Label element role is: AXRole: AXLabel
     8Label element role is: AXRole: AXGroup
    109PASS successfullyParsed is true
    1110
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-overrides-label.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
    7 
     8<div id="content">
    89<span id="labelShutdown"><label id="labelElement" for="shutdownTime">Shut down computer after</label></span>
    910<input id="shutdownTime" type="text" value="10" aria-labelledby="labelShutdown shutdownTime shutdownUnit" />
    1011<span id="shutdownUnit">minutes</span>
    11 
     12</div>
    1213<p id="description"></p>
    1314<div id="console"></div>
     
    2223          text.focus();
    2324          text = accessibilityController.focusedElement;
    24 
    25           debug("text.description is " + text.description);
     25          shouldBeEqualToString("platformValueForW3CName(text)", "Shut down computer after 10 minutes");
    2626
    2727          // There should be no title UI element.
     
    3232          // it's a label element (sometimes they are ignored).
    3333          debug("Label element role is: " + labelElement.role);
     34
     35          document.getElementById("content").style.visibility = "hidden";
    3436    }
    3537
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-stay-within-expected.txt

    r114362 r204707  
    1 Some focusable content before the application widgets.
     1This tests that aria-labelledby does not append all sibling to an ARIA name
    22
    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
     3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
     4
     5
     6PASS platformValueForW3CName(axButton) is "Reply Item Five"
     7PASS successfullyParsed is true
     8
     9TEST COMPLETE
     10
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-stay-within.html

    r120111 r204707  
     1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    12<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>
    67<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">
    119    <p>Some <a href="#">focusable content</a> before the application widgets.</p>
    1210    <ul role="toolbar">
     
    2624</ul>
    2725
    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
    3132        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";
    4138        }
    42     </script>
     39</script>
     40<script src="../resources/js-test-post.js"></script>
    4341</body>
    4442</html>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-with-descendants-expected.txt

    r174080 r204707  
    66
    77
    8 test 1: aria-labelledby description: AXDescription: hello link use world test1 test2 test3
     8test 1: aria-labelledby description: hello link use world test1 test2 test3
    99test 1: expected description: hello link use world test1 test2 test3
    1010
    11 test 2: aria-labelledby description: AXDescription: foo bar
     11test 2: aria-labelledby description: foo bar
    1212test 2: expected description: foo bar
    1313
    14 test 3: aria-labelledby description: AXDescription: foo bar
     14test 3: aria-labelledby description: foo bar
    1515test 3: expected description: foo bar
    1616
    17 test 4: aria-labelledby description: AXDescription: foo
     17test 4: aria-labelledby description: foo
    1818test 4: expected description: foo
    1919
    20 test 5: aria-labelledby description: AXDescription: Delete
     20test 5: aria-labelledby description: Delete
    2121test 5: expected description: Delete
    2222
    23 test 6: aria-labelledby description: AXDescription: Delete product name
     23test 6: aria-labelledby description: Delete product name
    2424test 6: expected description: Delete product name
    2525
    26 test 7: aria-labelledby description: AXDescription: foo bar baz bop bap boom
     26test 7: aria-labelledby description: foo bar baz bop bap boom
    2727test 7: expected description: foo bar baz bop bap boom
    2828
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-labelledby-with-descendants.html

    r174074 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    5051          for (var k = 1; k < 8; k++) {
    5152              var test = accessibilityController.accessibleElementById("test" + k);
    52               debug("test " + k + ": aria-labelledby description: " + test.description);
     53              debug("test " + k + ": aria-labelledby description: " + platformValueForW3CName(test));
    5354              debug("test " + k + ": expected description: " + document.getElementById("test" + k).getAttribute("data-label") + "\n");
    5455          }
  • 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.
     1This 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.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    44
    55
    6 Button description: AXDescription: text
     6PASS buttonAccName == button.getAttribute('aria-label') is true
     7PASS buttonAccName != button.innerText is true
    78PASS successfullyParsed is true
    89
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-namefrom-author.html

    r174074 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    5960<script>
    6061
    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.");
    6263
    6364    var labelledby = "";
     
    6869
    6970    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
    7176        document.getElementById("content").style.visibility = "hidden";
    7277    }
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-option-role.html

    r155274 r204707  
    3030
    3131          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);
    3336
    3437          shouldBe("firstChild.childrenCount", "0");
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-text-role-expected.txt

    r51576 r204707  
    55
    66
    7 PASS textrole.role is 'AXRole: AXStaticText'
     7PASS textrole.role is platformRoleForStaticText(textrole)
    88PASS textrole.stringValue is 'AXValue: all at once'
    99PASS textrole.elementAtPoint(x, y).isEqual(textrole) is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/aria-text-role.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/canvas-description-and-role-expected.txt

    r158810 r204707  
    55
    66PASS axContainer.childrenCount is 2
    7 Canvas 1 description: AXDescription: Canvas label
     7PASS platformValueForW3CName(axCanvas1) is "Canvas label"
    88Canvas 1 role: AXRole: AXCanvas
    9 Canvas 2 description: AXDescription:
     9PASS platformValueForW3CName(axCanvas2) is ""
    1010Canvas 2 role: AXRole: AXCanvas
    1111PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/canvas-description-and-role.html

    r155274 r204707  
    33<body>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56
    67<style>canvas { display: inline; border: 1px solid #000; }</style>
     
    2223
    2324    var axCanvas1 = axContainer.childAtIndex(0);
    24     debug('Canvas 1 description: ' + axCanvas1.description);
     25    shouldBeEqualToString("platformValueForW3CName(axCanvas1)", "Canvas label");
    2526    debug('Canvas 1 role: ' + axCanvas1.role);
    2627
    2728    var axCanvas2 = axContainer.childAtIndex(1);
    28     debug('Canvas 2 description: ' + axCanvas2.description);
     29    shouldBeEqualToString("platformValueForW3CName(axCanvas2)", "");
    2930    debug('Canvas 2 role: ' + axCanvas2.role);
    3031}
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/canvas-fallback-content.html

    r161666 r204707  
    33<body>
    44<script src="../resources/js-test-pre.js"></script>
    5 
     5<script src="../resources/accessibility-helper.js"></script>
    66<style>
    77myelement {
     
    5353    }
    5454
    55     var comboBoxRole = accessibilityController.platformName == "atk" ? "AXRole: AXComboBox" : "AXRole: AXPopUpButton";
     55    var comboBoxRole = platformRoleForComboBox(accessibilityController.platformName);
    5656
    5757    // Check rendered controls.
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/empty-image-with-title-expected.txt

    r151924 r204707  
    66
    77image1.role is AXRole: AXImage
    8 image1.description is AXDescription: baz
     8image1's accessible name with source is AXDescription: baz
    99PASS successfullyParsed is true
    1010
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/empty-image-with-title.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
    78
    89<img id="image1" src="foo.gif" title="baz" width="100" height="100">
    9 
    1010<div id="console"></div>
    1111
     
    1818          var image1 = accessibilityController.accessibleElementById("image1");
    1919          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);
    2123    }
    2224
  • 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:
    131This tests that fieldset and legend elements are exposed correctly.
    142
     
    164
    175
    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 
     6element id 'f0': High Score:
     7element id 'f1': High Score:
     8element id 'f2': New High Score:
     9element id 'f3': New High Score:
     10element id 'f4':
     11element id 'f5': High Score:
     12element id 'f6':
     13element id 'l0': AXValue: Other:
    2614PASS successfullyParsed is true
    2715
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/fieldset-element.html

    r157434 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56<title>Fieldset Element</title>
    67</head>
    78<body>
    8 
     9<div id="content">
    910<form>
    1011<!-- fieldset with aria-label. -->
     
    6465<!-- legend outside fieldset. -->
    6566<legend id="l0">Other:</legend>
    66 
     67</div>
    6768<p id="description"></p>
    6869<div id="console"></div>
     
    7980        fieldsetTestCount = document.getElementsByClassName("fieldsetTest").length;
    8081        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);
    8384        }
    84        
     85
    8586        // 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";
    8893    }
    8994</script>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/focusable-div-expected.txt

    r162576 r204707  
    1 A
    2 B
    3 C
    4 Link
    5 Initial text before linkLink
    6 List item
    7 Initial text before list
    8 List item
    91This test makes sure that a generic focusable div can get accessibility focus. It should not get accessible text from its children automatically though.
    102
     
    1911PASS lastChar(axDiv2.title) is ' '
    2012PASS document.activeElement == div3 is true
    21 PASS lastChar(axDiv3.description) is "D"
     13PASS lastChar(accNameForDiv3) is "D"
    2214PASS document.activeElement == div4 is true
    2315PASS axDiv4.title.indexOf('Link') is -1
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/focusable-div.html

    r162576 r204707  
    33<body>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
     6
     7<div id="content">
    58
    69<!-- A link always gets its accessible text from contents. -->
     
    1720<div id="div6" tabindex="0"><ul><li>List item</li></ul></div>
    1821<div id="div7" tabindex="0">Initial text before list<ul><li>List item</li></ul></div>
    19 
     22</div>
    2023<div id="console"></div>
    2124<script>
     
    5154    shouldBe("document.activeElement == div3", "true");
    5255    window.axDiv3 = accessibilityController.focusedElement;
    53     shouldBe("lastChar(axDiv3.description)", "\"D\"");
     56    var accNameForDiv3 = platformValueForW3CName(axDiv3);
     57    shouldBe("lastChar(accNameForDiv3)", "\"D\"");
    5458
    5559    var div4 = document.getElementById('div4');
     
    7882    shouldBe("axDiv7.title.indexOf('List item')", "-1");
    7983    shouldBe("axDiv7.title.indexOf('Initial text before list') >= 0", "false");
     84
     85    document.getElementById("content").style.visibility = "hidden";
    8086}
    8187
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt

    r187777 r204707  
    55
    66
    7 AXChildrenAdded on AXDescription: inner body
    8 AXChildrenAdded on AXDescription: inner body
     7AXChildrenAdded on AXTitle: inner body
     8AXChildrenAdded on AXTitle: inner body
    99PASS successfullyParsed is true
    1010
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/no-notification-for-unrendered-iframe-children.html

    r187804 r204707  
    2222        accessibilityController.addNotificationListener(function(element, notification) {
    2323            if (notification == "AXChildrenAdded" && element.role == "AXRole: AXGroup")
    24                 debug(notification + " on " + element.description);
     24                debug(notification + " on " + element.title);
    2525        });
    2626    }
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/object-attributes-expected.txt

    r187777 r204707  
    2727
    2828
    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'
     29AXRole: AXHeading
     30AXParent: AXWebArea
     31AXChildren: 0
     32AXPosition: { 8.000000, 8.000000 }
     33AXSize: { 784.000000, 36.000000 }
     34AXTitle: Heading Level 1
     35AXDescription:
     36AXValue: Heading Level 1
     37AXFocusable: 0
     38AXFocused: 0
     39AXSelectable: 0
     40AXSelected: 0
     41AXMultiSelectable: 0
     42AXEnabled: 1
     43AXExpanded: 0
     44AXRequired: 0
     45AXChecked: 0
     46AXPlatformAttributes: computed-role:heading, level:1, tag:h1, toolkit:WebKitGtk
     47------------
     48AXRole: AXHeading
     49AXParent: AXWebArea
     50AXChildren: 0
     51AXPosition: { 8.000000, 65.000000 }
     52AXSize: { 784.000000, 27.000000 }
     53AXTitle: Heading Level 2
     54AXDescription:
     55AXValue: Heading Level 2
     56AXFocusable: 0
     57AXFocused: 0
     58AXSelectable: 0
     59AXSelected: 0
     60AXMultiSelectable: 0
     61AXEnabled: 1
     62AXExpanded: 0
     63AXRequired: 0
     64AXChecked: 0
     65AXPlatformAttributes: computed-role:heading, level:2, tag:h2, toolkit:WebKitGtk
     66------------
     67AXRole: AXHeading
     68AXParent: AXWebArea
     69AXChildren: 0
     70AXPosition: { 8.000000, 111.000000 }
     71AXSize: { 784.000000, 22.000000 }
     72AXTitle: Heading Level 3
     73AXDescription:
     74AXValue: Heading Level 3
     75AXFocusable: 0
     76AXFocused: 0
     77AXSelectable: 0
     78AXSelected: 0
     79AXMultiSelectable: 0
     80AXEnabled: 1
     81AXExpanded: 0
     82AXRequired: 0
     83AXChecked: 0
     84AXPlatformAttributes: computed-role:heading, level:3, tag:h3, toolkit:WebKitGtk
     85------------
     86AXRole: AXHeading
     87AXParent: AXWebArea
     88AXChildren: 0
     89AXPosition: { 8.000000, 153.000000 }
     90AXSize: { 784.000000, 18.000000 }
     91AXTitle: Heading Level 4
     92AXDescription:
     93AXValue: Heading Level 4
     94AXFocusable: 0
     95AXFocused: 0
     96AXSelectable: 0
     97AXSelected: 0
     98AXMultiSelectable: 0
     99AXEnabled: 1
     100AXExpanded: 0
     101AXRequired: 0
     102AXChecked: 0
     103AXPlatformAttributes: computed-role:heading, level:4, tag:h4, toolkit:WebKitGtk
     104------------
     105AXRole: AXHeading
     106AXParent: AXWebArea
     107AXChildren: 0
     108AXPosition: { 8.000000, 192.000000 }
     109AXSize: { 784.000000, 16.000000 }
     110AXTitle: Heading Level 5
     111AXDescription:
     112AXValue: Heading Level 5
     113AXFocusable: 0
     114AXFocused: 0
     115AXSelectable: 0
     116AXSelected: 0
     117AXMultiSelectable: 0
     118AXEnabled: 1
     119AXExpanded: 0
     120AXRequired: 0
     121AXChecked: 0
     122AXPlatformAttributes: computed-role:heading, level:5, tag:h5, toolkit:WebKitGtk
     123------------
     124AXRole: AXHeading
     125AXParent: AXWebArea
     126AXChildren: 0
     127AXPosition: { 8.000000, 232.000000 }
     128AXSize: { 784.000000, 13.000000 }
     129AXTitle: Heading Level 6
     130AXDescription:
     131AXValue: Heading Level 6
     132AXFocusable: 0
     133AXFocused: 0
     134AXSelectable: 0
     135AXSelected: 0
     136AXMultiSelectable: 0
     137AXEnabled: 1
     138AXExpanded: 0
     139AXRequired: 0
     140AXChecked: 0
     141AXPlatformAttributes: computed-role:heading, level:6, tag:h6, toolkit:WebKitGtk
     142------------
     143AXRole: AXSection
     144AXParent: AXWebArea
     145AXChildren: 1
     146AXPosition: { 8.000000, 269.000000 }
     147AXSize: { 784.000000, 18.000000 }
     148AXTitle:
     149AXDescription:
     150AXValue: Link
     151AXFocusable: 0
     152AXFocused: 0
     153AXSelectable: 0
     154AXSelected: 0
     155AXMultiSelectable: 0
     156AXEnabled: 1
     157AXExpanded: 0
     158AXRequired: 0
     159AXChecked: 0
     160AXPlatformAttributes: toolkit:WebKitGtk
     161------------
     162AXRole: AXSection
     163AXParent: AXWebArea
     164AXChildren: 0
     165AXPosition: { 10.000000, 288.000000 }
     166AXSize: { 23.000000, 20.000000 }
     167AXTitle:
     168AXDescription:
     169AXValue: foo
     170AXFocusable: 0
     171AXFocused: 0
     172AXSelectable: 0
     173AXSelected: 0
     174AXMultiSelectable: 0
     175AXEnabled: 1
     176AXExpanded: 0
     177AXRequired: 0
     178AXChecked: 0
     179AXPlatformAttributes: tag:td, toolkit:WebKitGtk
     180------------
     181AXRole: AXSection
     182AXParent: AXWebArea
     183AXChildren: 0
     184AXPosition: { 35.000000, 288.000000 }
     185AXSize: { 22.000000, 20.000000 }
     186AXTitle:
     187AXDescription:
     188AXValue: bar
     189AXFocusable: 0
     190AXFocused: 0
     191AXSelectable: 0
     192AXSelected: 0
     193AXMultiSelectable: 0
     194AXEnabled: 1
     195AXExpanded: 0
     196AXRequired: 0
     197AXChecked: 0
     198AXPlatformAttributes: tag:td, toolkit:WebKitGtk
     199------------
     200AXRole: AXTable
     201AXParent: AXWebArea
     202AXChildren: 3
     203AXPosition: { 8.000000, 309.000000 }
     204AXSize: { 81.000000, 74.000000 }
     205AXTitle:
     206AXDescription:
     207AXFocusable: 0
     208AXFocused: 0
     209AXSelectable: 0
     210AXSelected: 0
     211AXMultiSelectable: 0
     212AXEnabled: 1
     213AXExpanded: 0
     214AXRequired: 0
     215AXChecked: 0
     216AXPlatformAttributes: computed-role:table, tag:table, toolkit:WebKitGtk
     217------------
     218AXRole: AXParagraph
     219AXParent: AXWebArea
     220AXChildren: 2
     221AXPosition: { 8.000000, 398.000000 }
     222AXSize: { 784.000000, 51.000000 }
     223AXTitle:
     224AXDescription:
     225AXValue: 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>
     226AXFocusable: 1
     227AXFocused: 0
     228AXSelectable: 0
     229AXSelected: 0
     230AXMultiSelectable: 0
     231AXEnabled: 1
     232AXExpanded: 0
     233AXRequired: 0
     234AXChecked: 0
     235AXPlatformAttributes: html-id:description, tag:p, toolkit:WebKitGtk
     236------------
     237
    47238PASS successfullyParsed is true
    48239
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/object-attributes.html

    r187804 r204707  
    2828        testRunner.dumpAsText();
    2929        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());
    5831    }
    5932</script>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/title-and-alt-expected.txt

    r187777 r204707  
    11
    2 Functional label:
     2Functional label:   
    33This tests the exposure of alt and title information.
    44
     
    88PASS image.title is 'AXTitle: Image alt attr'
    99PASS image.description is 'AXDescription: Image title attr'
    10 PASS link.title is 'AXTitle: '
     10PASS link.title is 'AXTitle: Functional label'
    1111PASS link.description is 'AXDescription: Link title attr'
    12 PASS entry.title is 'AXTitle: '
    13 PASS entry.description is 'AXDescription: Entry title attr'
     12PASS entry.title is 'AXTitle: Entry title attr'
     13PASS entry.description is 'AXDescription: '
    1414PASS button.title is 'AXTitle: Submit'
    1515PASS button.description is 'AXDescription: Submit button title attr'
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/gtk/title-and-alt.html

    r187804 r204707  
    55</head>
    66<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">
    88<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" />
    1013</form>
    1114<p id="description"></p>
     
    1518    if (window.accessibilityController) {
    1619        testRunner.dumpAsText();
    17         document.getElementById("body").focus();
    18         var webArea = accessibilityController.focusedElement;
    1920
    20         var image = webArea.childAtIndex(0);
     21        var image = accessibilityController.accessibleElementById("image");
    2122        shouldBe("image.title", "'AXTitle: Image alt attr'");
    2223        shouldBe("image.description", "'AXDescription: Image title attr'");
    2324
    24         var link = webArea.childAtIndex(1);
    25         shouldBe("link.title", "'AXTitle: '");
     25        var link = accessibilityController.accessibleElementById("link");
     26        shouldBe("link.title", "'AXTitle: Functional label'");
    2627        shouldBe("link.description", "'AXDescription: Link title attr'");
    2728
    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: '");
    3132
    32         var button = webArea.childAtIndex(4);
     33        var button = accessibilityController.accessibleElementById("button");
    3334        shouldBe("button.title", "'AXTitle: Submit'");
    3435        shouldBe("button.description", "'AXDescription: Submit button title attr'");
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/help-text.html

    r167054 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    6667            if (!ax)
    6768                continue;
    68             var output = ax.helpText.replace("AXHelp: ", "");
     69            var output = platformValueForW3CDescription(ax);
    6970            var result = document.getElementById("console");
    7071            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:    Image
    21
    32
     
    98
    109PASS imagesGroup.childrenCount is 1
     10PASS platformValueForW3CName(imagesGroup.childAtIndex(0)) is "   Image "
    1111PASS successfullyParsed is true
    1212
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-alt-tag-only-whitespace.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    2425        var imagesGroup = accessibilityController.focusedElement;
    2526        shouldBe("imagesGroup.childrenCount", "1");
    26         console.log("Image description: " + imagesGroup.childAtIndex(0).description);
     27        shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(0))", "   Image ");
    2728    }
    2829
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-aria-button-alt-tag-expected.txt

    r151924 r204707  
    11
    2 This test makes sure that a img acting as an aria button still returns its alt tag as the description
     2This test makes sure that a img acting as an aria button still returns its alt tag as the accessible name
    33
    44On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    55
    66
    7 imgUIElement.description is AXDescription: alternate
     7PASS platformValueForW3CName(imgUIElement) is "alternate"
    88PASS successfullyParsed is true
    99
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-aria-button-alt-tag.html

    r155274 r204707  
    22<head>
    33<script src="../resources/js-test-pre.js"></script>
     4<script src="../resources/accessibility-helper.js"></script>
    45</head>
    56<script>
     
    1516     
    1617    <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");
    1819 
    1920        if (window.accessibilityController) {
     
    2223            var body = document.getElementById("body").focus();
    2324            var imgUIElement = accessibilityController.focusedElement.childAtIndex(0).childAtIndex(0);
    24             debug("imgUIElement.description is " + imgUIElement.description);
     25            shouldBeEqualToString("platformValueForW3CName(imgUIElement)", "alternate");
    2526        }
    2627    </script>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/img-fallsback-to-title.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    2930        // The title should NOT be in the help text.
    3031        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));
    3334
    3435        // Second image should use the description from the alt tag instead of the title.
    3536        // The help text should reflect what's in the title.
    3637        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));
    3940
    4041        // Now do the same checks for ARIA type images.
    4142        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));
    4445
    4546        // Now do the same checks for ARIA type images.
    4647        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));
    4950
    5051        // 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  
    11
    2 This test makes sure that an input image returns its alt tag as the description
     2This test makes sure that an input image returns its alt tag as the accessible name
    33
    44On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    55
    66
    7 img.description is AXDescription: Submit
     7PASS platformValueForW3CName(img) is "Submit"
    88PASS successfullyParsed is true
    99
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/input-image-alt.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    1314    <script>
    1415        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");
    1617
    1718            var image1 = document.getElementById("image1").focus();
    1819            var img = accessibilityController.focusedElement;
    19 
    20             debug("img.description is " + img.description);
     20            shouldBeEqualToString("platformValueForW3CName(img)", "Submit");
    2121        }
    2222    </script>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/loading-iframe-sends-notification.html

    r160903 r204707  
    22<head>
    33<script src="../resources/js-test-pre.js"></script>
     4<script src="../resources/accessibility-helper.js"></script>
    45</head>
    56<body>
     
    5556            window.accessibilityController.addNotificationListener(function (target, notification) {
    5657                // 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
    5861                    || (notification != "AXLoadComplete" && notification != "AXLayoutComplete"))
    5962                    return;
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/media-element.html

    r155274 r204707  
    1919            function dumpObject(axObject)
    2020            {
    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);
    2225                debug(indent(indentLevel) + "role: " + axObject.role);
    2326                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  
    4040            var radio2 = accessibilityController.accessibleElementById("r2");
    4141            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            }
    4449            shouldBeTrue("!titleUIElement || titleUIElement.title == 'AXTitle: '");
    4550
     
    4752            var radio3 = accessibilityController.accessibleElementById("r3");
    4853            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            }
    5161            shouldBeTrue("!titleUIElement || titleUIElement.title == 'AXTitle: '");
    5262
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/self-referencing-aria-labelledby-expected.txt

    r155601 r204707  
    1 X ?          Y Z
    21This tests that self-referencing aria-labelledby is exposed correctly.
    32
     
    54
    65
    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'
     6PASS platformValueForW3CName(test) is "X Y Z"
     7PASS platformValueForW3CName(test) is "X Y Z"
     8PASS platformValueForW3CName(test) is "X Y Z"
     9PASS platformValueForW3CName(test) is "X Y Z"
     10PASS platformValueForW3CName(test) is "X Y Z"
     11PASS platformValueForW3CName(test) is "X Y Z"
     12PASS platformValueForW3CName(test) is "X Y Z"
    1413PASS successfullyParsed is true
    1514
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/self-referencing-aria-labelledby.html

    r155601 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56<title>Self-Referencing aria-labelledby</title>
    67</head>
    78<body>
    8 
     9<div id="content">
    910<!-- Self-referencing label should be the content text. -->
    1011<a aria-labelledby="t0 s0 s1" class="test" href="#" id="t0">X</a>
     
    3031<span id="s0">Y</span>
    3132<span id="s1">Z</span>
    32 
     33</div>
    3334<p id="description"></p>
    3435<div id="console"></div>
     
    4142        for (var i = 0; i < testCount; ++i) {
    4243            var test = accessibilityController.accessibleElementById("t" + i);
    43             shouldBe("test.description", "'AXDescription: X Y Z'");
     44            shouldBeEqualToString("platformValueForW3CName(test)", "X Y Z");
    4445        }
     46
     47        document.getElementById("content").style.visibility = "hidden";
    4548    }
    4649</script>
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-bounds.html

    r155274 r204707  
    33<body>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56
    67<div id="container" style="position: relative; top: 100px; left: 600px; width:400px; height: 400px;" role="group" tabindex="0">
     
    4748    var face = container.childAtIndex(0);
    4849    debug('Face role: ' + face.role);
    49     debug('Face label: ' + face.description);
     50    debug('Face label: ' + platformValueForW3CName(face, true));
    5051    debug('FaceX: ' + (pageX(face) - x));
    5152    debug('FaceY: ' + Math.abs(pageY(face) - y));
     
    5455    var eye = container.childAtIndex(1);
    5556    debug('Eye role: ' + eye.role);
    56     debug('Eye label: ' + eye.description);
     57    debug('Eye label: ' + platformValueForW3CName(eye, true));
    5758    debug('EyeX: ' + (pageX(eye) - x));
    5859    debug('EyeY: ' + Math.abs(pageY(eye) - y));
     
    6162    var nose = container.childAtIndex(3);
    6263    debug('Nose role: ' + nose.role);
    63     debug('Nose label: ' + nose.description);
     64    debug('Nose label: ' + platformValueForW3CName(nose, true));
    6465    debug('NoseX: ' + (pageX(nose) - x));
    6566    debug('NoseY: ' + Math.abs(pageY(nose) - y));
     
    6869    var mouth = container.childAtIndex(4);
    6970    debug('Mouth role: ' + mouth.role);
    70     debug('Mouth label: ' + mouth.description);
     71    debug('Mouth label: ' + platformValueForW3CName(mouth, true));
    7172    debug('MouthX: ' + (pageX(mouth) - x));
    7273    debug('MouthY: ' + Math.floor(Math.abs(pageY(mouth) - y)));
     
    7576    // Text varies by about 1 - 2 pixels depending on the platform,
    7677    // 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);
    7881    debug('Text role: ' + text.role);
    7982    debug('TextX/10: ' + Math.floor((pageX(text) - x) / 10));
     
    8386    var image = container.childAtIndex(6);
    8487    debug('Image role: ' + image.role);
    85     debug('Image label: ' + image.description);
     88    debug('Image label: ' + platformValueForW3CName(image, true));
    8689    debug('ImageX: ' + (pageX(image) - x));
    8790    debug('ImageY: ' + Math.abs(pageY(image) - y));
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-group-element-with-title-expected.txt

    r147802 r204707  
    66Verify that the SVG group is returned as an accessible element.
    77PASS group1.role is 'AXRole: AXGroup'
    8 PASS group1.description is 'AXDescription: SVG TITLE 1'
     8PASS platformValueForW3CName(group1) is "SVG TITLE 1"
    99
    1010Verify that you can hit-test to the SVG group.
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-group-element-with-title.html

    r168313 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    2526          var group1 = accessibilityController.accessibleElementById("group1");
    2627          shouldBe("group1.role", "'AXRole: AXGroup'");
    27           shouldBe("group1.description", "'AXDescription: SVG TITLE 1'");
     28          shouldBeEqualToString("platformValueForW3CName(group1)", "SVG TITLE 1");
    2829
    2930          debug("\nVerify that you can hit-test to the SVG group.");
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-image-expected.txt

    r168350 r204707  
    66
    77PASS svgImage.role is realImage.role
    8 PASS svgImage.description is realImage.description
     8PASS platformValueForW3CName(svgImage) is platformValueForW3CName(realImage)
     9PASS platformValueForW3CDescription(svgImage) is platformValueForW3CDescription(realImage)
    910SVG Image Role: AXRole: AXImage
    10 SVG Image Description: AXDescription: TestImage
     11SVG Image Accessible Name: TestImage
     12SVG Image Accessible Description:
    1113PASS successfullyParsed is true
    1214
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-image.html

    r155274 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body id="body">
     
    2829        var svgImage = accessibilityController.focusedElement;
    2930        shouldBe("svgImage.role", "realImage.role");
    30         shouldBe("svgImage.description", "realImage.description");
     31        shouldBe("platformValueForW3CName(svgImage)", "platformValueForW3CName(realImage)");
     32        shouldBe("platformValueForW3CDescription(svgImage)", "platformValueForW3CDescription(realImage)");
    3133       
    3234        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));
    3437    }
    35 
    3638</script>
    3739
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-labelledby-expected.txt

    r166917 r204707  
    55
    66
    7 SVG Element: AXDescription: Sudan
     7PASS platformValueForW3CName(image) is "Sudan"
    88PASS successfullyParsed is true
    99
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-labelledby.html

    r166917 r204707  
    33<head>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56</head>
    67<body>
     
    2930    if (window.accessibilityController) {
    3031        var image = accessibilityController.accessibleElementById("Sudan");
    31         debug("SVG Element: " + image.description);
     32        shouldBeEqualToString("platformValueForW3CName(image)", "Sudan");
    3233    }
    3334
  • releases/WebKitGTK/webkit-2.12/LayoutTests/accessibility/svg-remote-element.html

    r155274 r204707  
    33<body>
    44<script src="../resources/js-test-pre.js"></script>
     5<script src="../resources/accessibility-helper.js"></script>
    56
    67<img tabindex="0" id="svg-image" alt="interactive SVG" >
     
    3233    var face = container.childAtIndex(0);
    3334    debug('Face role: ' + face.role);
    34     debug('Face label: ' + face.description);
     35    debug('Face label: ' + platformValueForW3CName(face, true));
    3536    debug('FaceX: ' + (pageX(face) - x));
    3637    debug('FaceY: ' + Math.abs(pageY(face) - y));
     
    3940    var eye = container.childAtIndex(1);
    4041    debug('Eye role: ' + eye.role);
    41     debug('Eye label: ' + eye.description);
     42    debug('Eye label: ' + platformValueForW3CName(eye, true));
    4243    debug('EyeX: ' + (pageX(eye) - x));
    4344    debug('EyeY: ' + Math.abs(pageY(eye) - y));
     
    4647    var nose = container.childAtIndex(3);
    4748    debug('Nose role: ' + nose.role);
    48     debug('Nose label: ' + nose.description);
     49    debug('Nose label: ' + platformValueForW3CName(nose, true));
    4950    debug('NoseX: ' + (pageX(nose) - x));
    5051    debug('NoseY: ' + Math.abs(pageY(nose) - y));
     
    5354    var mouth = container.childAtIndex(4);
    5455    debug('Mouth role: ' + mouth.role);
    55     debug('Mouth label: ' + mouth.description);
     56    debug('Mouth label: ' + platformValueForW3CName(mouth, true));
    5657    debug('MouthX: ' + (pageX(mouth) - x));
    5758    debug('MouthY: ' + Math.floor(Math.abs(pageY(mouth) - y)));
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/TestExpectations

    r200841 r204707  
    8484# written in a platform-specific way. They should either be moved to
    8585# 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
    8787# Things specific to AX API (at least at the moment)
    8888webkit.org/b/98348 accessibility/radio-button-group-members.html [ Skip ]
     
    14211421webkit.org/b/132266 js/slow-stress/emscripten-memops.html [ Timeout Pass ]
    14221422
    1423 webkit.org/b/133148 accessibility/content-editable-as-textarea.html [ Crash Timeout ]
    14241423webkit.org/b/133148 accessibility/content-editable-set-inner-text-generates-axvalue-notification.html [ Timeout ]
    14251424
     
    16741673webkit.org/b/42194 http/tests/security/drag-drop-same-unique-origin.html [ Failure ]
    16751674
    1676 webkit.org/b/106340 accessibility/img-fallsback-to-title.html [ Failure ]
    1677 
    16781675# svg/ failures
    16791676webkit.org/b/42457 svg/custom/embedded-svg-allowed-in-dashboard.xml [ Failure ]
     
    17961793# Need platform specific update to test to make it run.
    17971794
    1798 webkit.org/b/98357 accessibility/aria-readonly.html [ Failure ]
    17991795webkit.org/b/98359 accessibility/aria-text-role.html [ Failure ]
    18001796webkit.org/b/98363 accessibility/canvas-fallback-content-2.html [ Failure ]
     
    18961892Bug(GTK) sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.3/S15.9.3.1_A5_T5.html [ Failure ]
    18971893Bug(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 tests
    1900 webkit.org/b/44316 accessibility/gtk/object-attributes.html [ Failure ]
    1901 webkit.org/b/44316 accessibility/gtk/title-and-alt.html [ Failure ]
    19021894
    19031895# Expose title direction in WebKit API
     
    21922184# Test globally skipped, passing on GTK port
    21932185webkit.org/b/124349 fast/hidpi/image-srcset-relative-svg-canvas.html [ Pass ]
    2194 
    2195 webkit.org/b/131496 accessibility/help-text.html [ Failure ]
    21962186
    21972187webkit.org/b/131498 fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html [ ImageOnlyFailure ]
     
    26362626webkit.org/b/153941 fast/text/control-characters/visible-control-characters-3.xhtml [ ImageOnlyFailure Pass ]
    26372627
    2638 webkit.org/b/153956 accessibility/gtk/caret-offsets.html [ Failure ]
    2639 
    26402628#////////////////////////////////////////////////////////////////////////////////////////
    26412629# 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  minutes
    21This tests that if aria-labelledby is used, then label elements are not used
    32
     
    54
    65
    7 text.description is AXDescription: Shut down computer after 10 minutes
     6PASS platformValueForW3CName(text) is "Shut down computer after 10 minutes"
    87PASS text.titleUIElement() != null && text.titleUIElement().isValid is false
    9 Label element role is: AXRole: AXGroup
     8Label element role is: AXRole: AXLabel
    109PASS successfullyParsed is true
    1110
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/aria-switch-text-expected.txt

    r189467 r204707  
    1313widget.description is AXDescription:
    1414widget.childrenCount is 0
    15 widget.title is AXTitle: Three
    16 widget.description is AXDescription: foo
     15widget.title is AXTitle: foo
     16widget.description is AXDescription:
    1717widget.childrenCount is 0
    1818PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/aria-text-role-expected.txt

    r204706 r204707  
    55
    66
    7 PASS textrole.role is 'AXRole: AXStaticText'
     7PASS textrole.role is 'AXRole: AXStatic'
    88PASS textrole.stringValue is 'AXValue: all at once'
    99PASS 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  
    55
    66PASS axContainer.childrenCount is 2
    7 Canvas 1 description: AXDescription: Canvas label
     7PASS platformValueForW3CName(axCanvas1) is "Canvas label"
    88Canvas 1 role: AXRole: AXCanvas
    9 Canvas 2 description: AXDescription:
     9PASS platformValueForW3CName(axCanvas2) is ""
    1010Canvas 2 role: AXRole: AXCanvas
    1111PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/empty-image-with-title-expected.txt

    r204706 r204707  
    66
    77image1.role is AXRole: AXImage
    8 image1.description is AXDescription: baz
     8image1's accessible name with source is AXTitle: baz
    99PASS successfullyParsed is true
    1010
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-link-expected.txt

    r193841 r204707  
    77AXParent: AXSection
    88AXChildren: 1
    9 AXPosition: { 8.000000, 98.000000 }
    10 AXSize: { 280.000000, 213.000000 }
     9AXPosition: { 8.000000, 97.000000 }
     10AXSize: { 280.000000, 214.000000 }
    1111AXTitle: Delicious cake
    1212AXDescription:
     
    2828AXParent: AXLink: Delicious cake
    2929AXChildren: 0
    30 AXPosition: { 8.000000, 99.000000 }
     30AXPosition: { 8.000000, 98.000000 }
    3131AXSize: { 280.000000, 210.000000 }
    3232AXTitle: Delicious cake
    33 AXDescription: Delicious cake
     33AXDescription:
    3434AXFocusable: 0
    3535AXFocused: 0
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-map1-expected.txt

    r189467 r204707  
    77Link1 role: AXRole: AXLink
    88Link1 title: AXTitle: Link1
    9 Link1 description: AXDescription: Link1
     9Link1 description: AXDescription:
    1010
    1111Link2 role: AXRole: AXLink
    1212Link2 title: AXTitle: Link2
    13 Link2 description: AXDescription: Link2
     13Link2 description: AXDescription:
    1414
    1515Link3 role: AXRole: AXLink
    1616Link3 title: AXTitle: Link3
    17 Link3 description: AXDescription: Link3
     17Link3 description: AXDescription:
    1818
    1919PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-map2-expected.txt

    r189467 r204707  
    2626AXSize: { 123.000000, 62.000000 }
    2727AXTitle: Link1
    28 AXDescription: Link1
     28AXDescription:
    2929AXValue:
    3030AXFocusable: 0
     
    4646AXSize: { 122.000000, 14.000000 }
    4747AXTitle: Link2
    48 AXDescription: Link2
     48AXDescription:
    4949AXValue:
    5050AXFocusable: 0
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/image-with-alt-and-map-expected.txt

    r193841 r204707  
    88AXRole: AXWebArea AXTitle:  AXDescription:
    99  AXRole: AXSection AXTitle:  AXDescription:
    10     AXRole: AXImageMap AXTitle: foo bar baz AXDescription: foo bar baz
    11       AXRole: AXLink AXTitle: foo AXDescription: foo
    12       AXRole: AXLink AXTitle: bar AXDescription: bar
    13       AXRole: AXLink AXTitle: baz AXDescription: baz
     10    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:
    1414PASS successfullyParsed is true
    1515
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/img-fallsback-to-title-expected.txt

    r189467 r204707  
    1    
    2 test
     1     test
    32test
    43This tests that images will fallback to using the title attribute if no other descriptive text is present.
     
    76
    87
    9 Image1 description: AXDescription: test1
    10 Image1 help: AXHelp:
    11 
    12 Image2 description: AXDescription: test2
    13 Image2 help: AXHelp: test2
    14 
    15 Image3 description: AXDescription: test3
    16 Image3 help: AXHelp:
    17 
    18 Image4 description: AXDescription: alt
    19 Image4 help: AXHelp: test4
    20 
     8Image1:
     9        AXTitle: test1
     10        AXDescription:
     11Image2:
     12        AXTitle: alt
     13        AXDescription: test2
     14Image3:
     15        AXTitle: test3
     16        AXDescription:
     17Image4:
     18        AXTitle: alt
     19        AXDescription: test4
    2120PASS imagesGroup.childAtIndex(0).childrenCount is 2
    2221PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/math-multiscript-attributes-expected.txt

    r189467 r204707  
    3131AXParent: AXSection
    3232AXChildren: 0
    33 AXPosition: { 33.000000, -14.000000 }
     33AXPosition: { 32.000000, -15.000000 }
    3434AXSize: { 11.000000, 81.000000 }
    3535AXTitle:
     
    5050AXParent: AXSection
    5151AXChildren: 0
    52 AXPosition: { 33.000000, -26.000000 }
     52AXPosition: { 32.000000, -26.000000 }
    5353AXSize: { 11.000000, 80.000000 }
    5454AXTitle:
     
    6969AXParent: AXSection
    7070AXChildren: 0
    71 AXPosition: { 9.000000, -14.000000 }
     71AXPosition: { 9.000000, -15.000000 }
    7272AXSize: { 10.000000, 81.000000 }
    7373AXTitle:
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/media-element-expected.txt

    r189467 r204707  
    66State at 'canplaythrough' event:
    77
    8     description: AXDescription:
     8    title: AXTitle:
    99    role: AXRole: AXVideo
    1010
    1111
    12         description: AXDescription: Video Playback
     12        title: AXTitle: Video Playback
    1313        role: AXRole: AXToolbar
    1414
    1515
    16             description: AXDescription: Play
     16            title: AXTitle: Play
    1717            role: AXRole: AXButton
    1818
    1919
    20             description: AXDescription: Duration
     20            title: AXTitle: Duration
    2121            role: AXRole: AXSlider
    2222
    2323
    24             description: AXDescription: Remaining
     24            title: AXTitle: Remaining
    2525            role: AXRole: AXTimer
    2626
    2727
    28             description: AXDescription: Display Full Screen
     28            title: AXTitle: Display Full Screen
    2929            role: AXRole: AXButton
    3030
    3131
    32             description: AXDescription: Mute
     32            title: AXTitle: Mute
    3333            role: AXRole: AXButton
    3434
    3535
    36             description: AXDescription: Volume
     36            title: AXTitle: Volume
    3737            role: AXRole: AXSlider
    3838
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/radio-button-title-label-expected.txt

    r189467 r204707  
    66PASS radio1.title is 'AXTitle: LABEL'
    77PASS titleUIElement.isEqual(accessibilityController.accessibleElementById('label1')) is true
    8 PASS radio2.description is 'AXDescription: LABEL2a'
    9 PASS radio2.title is 'AXTitle: '
     8PASS radio2.title is 'AXTitle: LABEL2a'
     9PASS radio2.description is 'AXDescription: '
    1010PASS !titleUIElement || titleUIElement.title == 'AXTitle: ' is true
    11 PASS radio3.description is 'AXDescription: radio3'
    12 PASS radio3.title is 'AXTitle: '
     11PASS radio3.title is 'AXTitle: radio3'
     12PASS radio2.description is 'AXDescription: '
    1313PASS !titleUIElement || titleUIElement.title == 'AXTitle: ' is true
    1414PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt

    r195827 r204707  
    1212AXParent: AXRow
    1313AXChildren: 0
    14 AXPosition: { 235.000000, 26.000000 }
     14AXPosition: { 234.000000, 26.000000 }
    1515AXSize: { 144.000000, 63.000000 }
    1616AXTitle:
     
    3131AXParent: AXRow
    3232AXChildren: 0
    33 AXPosition: { 235.000000, 26.000000 }
     33AXPosition: { 234.000000, 26.000000 }
    3434AXSize: { 144.000000, 63.000000 }
    3535AXTitle:
     
    5050AXParent: AXRow
    5151AXChildren: 0
    52 AXPosition: { 378.000000, 26.000000 }
     52AXPosition: { 377.000000, 26.000000 }
    5353AXSize: { 70.000000, 63.000000 }
    5454AXTitle:
     
    6969AXParent: AXRow
    7070AXChildren: 0
    71 AXPosition: { 447.000000, 26.000000 }
     71AXPosition: { 446.000000, 26.000000 }
    7272AXSize: { 120.000000, 29.000000 }
    7373AXTitle:
     
    8888AXParent: AXRow
    8989AXChildren: 0
    90 AXPosition: { 447.000000, 26.000000 }
     90AXPosition: { 446.000000, 26.000000 }
    9191AXSize: { 120.000000, 29.000000 }
    9292AXTitle:
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-cell-spans-expected.txt

    r195827 r204707  
    5656AXParent: AXRow
    5757AXChildren: 0
    58 AXPosition: { 147.000000, 84.000000 }
     58AXPosition: { 146.000000, 84.000000 }
    5959AXSize: { 124.000000, 58.000000 }
    6060AXTitle:
     
    7878AXParent: AXRow
    7979AXChildren: 0
    80 AXPosition: { 147.000000, 84.000000 }
     80AXPosition: { 146.000000, 84.000000 }
    8181AXSize: { 124.000000, 58.000000 }
    8282AXTitle:
     
    100100AXParent: AXRow
    101101AXChildren: 0
    102 AXPosition: { 516.000000, 84.000000 }
     102AXPosition: { 515.000000, 84.000000 }
    103103AXSize: { 124.000000, 29.000000 }
    104104AXTitle:
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt

    r195827 r204707  
    1414AXParent: AXRow
    1515AXChildren: 0
    16 AXPosition: { 235.000000, 26.000000 }
     16AXPosition: { 234.000000, 26.000000 }
    1717AXSize: { 144.000000, 63.000000 }
    1818AXTitle:
     
    3434AXParent: AXRow
    3535AXChildren: 0
    36 AXPosition: { 447.000000, 55.000000 }
     36AXPosition: { 446.000000, 55.000000 }
    3737AXSize: { 53.000000, 34.000000 }
    3838AXTitle:
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-detection-expected.txt

    r201270 r204707  
    55AXParent: AXWebArea
    66AXChildren: 2
    7 AXPosition: { 8.000000, 66.000000 }
     7AXPosition: { 8.000000, 65.000000 }
    88AXSize: { 62.000000, 45.000000 }
    99AXTitle:
     
    2828AXParent: AXWebArea
    2929AXChildren: 1
    30 AXPosition: { 8.000000, 484.000000 }
     30AXPosition: { 8.000000, 483.000000 }
    3131AXSize: { 68.000000, 28.000000 }
    3232AXTitle:
     
    117117AXParent: AXWebArea
    118118AXChildren: 2
    119 AXPosition: { 8.000000, 333.000000 }
     119AXPosition: { 8.000000, 332.000000 }
    120120AXSize: { 58.000000, 41.000000 }
    121121AXTitle:
     
    140140AXParent: AXWebArea
    141141AXChildren: 1
    142 AXPosition: { 8.000000, 333.000000 }
     142AXPosition: { 8.000000, 332.000000 }
    143143AXSize: { 58.000000, 22.000000 }
    144144AXTitle:
     
    162162AXParent: AXWebArea
    163163AXChildren: 0
    164 AXPosition: { 8.000000, 333.000000 }
     164AXPosition: { 8.000000, 332.000000 }
    165165AXSize: { 26.000000, 18.000000 }
    166166AXTitle:
     
    230230AXParent: AXWebArea
    231231AXChildren: 0
    232 AXPosition: { 8.000000, 346.000000 }
     232AXPosition: { 8.000000, 345.000000 }
    233233AXSize: { 769.000000, 27.000000 }
    234234AXTitle:
     
    253253AXParent: AXWebArea
    254254AXChildren: 1
    255 AXPosition: { 8.000000, 346.000000 }
     255AXPosition: { 8.000000, 345.000000 }
    256256AXSize: { 130.000000, 18.000000 }
    257257AXTitle:
     
    282282AXParent: AXWebArea
    283283AXChildren: 1
    284 AXPosition: { 8.000000, 333.000000 }
     284AXPosition: { 8.000000, 332.000000 }
    285285AXSize: { 64.000000, 26.000000 }
    286286AXTitle:
     
    376376AXParent: AXWebArea
    377377AXChildren: 3
    378 AXPosition: { 8.000000, 333.000000 }
     378AXPosition: { 8.000000, 332.000000 }
    379379AXSize: { 64.000000, 68.000000 }
    380380AXTitle:
     
    400400AXParent: AXWebArea
    401401AXChildren: 2
    402 AXPosition: { 8.000000, 333.000000 }
     402AXPosition: { 8.000000, 332.000000 }
    403403AXSize: { 62.000000, 45.000000 }
    404404AXTitle:
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/gtk/accessibility/table-sections-expected.txt

    r195827 r204707  
    2121AXParent: AXRow
    2222AXChildren: 0
    23 AXPosition: { 363.000000, 60.000000 }
     23AXPosition: { 362.000000, 60.000000 }
    2424AXSize: { 21.000000, 29.000000 }
    2525AXTitle:
     
    4040AXParent: AXRow
    4141AXChildren: 0
    42 AXPosition: { 383.000000, 60.000000 }
     42AXPosition: { 382.000000, 60.000000 }
    4343AXSize: { 28.000000, 29.000000 }
    4444AXTitle:
     
    5959AXParent: AXRow
    6060AXChildren: 0
    61 AXPosition: { 410.000000, 60.000000 }
     61AXPosition: { 409.000000, 60.000000 }
    6262AXSize: { 29.000000, 29.000000 }
    6363AXTitle:
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/canvas-description-and-role-expected.txt

    r127084 r204707  
    55
    66PASS axContainer.childrenCount is 2
    7 Canvas 1 description: AXDescription: Canvas label
     7PASS platformValueForW3CName(axCanvas1) is "Canvas label"
    88Canvas 1 role: AXRole: AXImage
    9 Canvas 2 description: AXDescription:
     9PASS platformValueForW3CName(axCanvas2) is ""
    1010Canvas 2 role: AXRole: AXGroup
    1111PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/mac/accessibility/img-fallsback-to-title-expected.txt

    r152388 r204707  
    66
    77
    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 
     8Image1:
     9        AXTitle:
     10        AXDescription: test1
     11        AXHelp:
     12Image2:
     13        AXTitle:
     14        AXDescription: alt
     15        AXHelp: test2
     16Image3:
     17        AXTitle:
     18        AXDescription: test3
     19        AXHelp:
     20Image4:
     21        AXTitle:
     22        AXDescription: alt
     23        AXHelp: test4
    2024PASS imagesGroup.childAtIndex(0).childrenCount is 2
    2125PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/platform/win/accessibility/canvas-description-and-role-expected.txt

    r179026 r204707  
    55
    66PASS axContainer.childrenCount is 2
    7 Canvas 1 description: AXDescription: Canvas label
     7PASS platformValueForW3CName(axCanvas1) is "Canvas label"
    88Canvas 1 role: AXRole: AXImage
    9 Canvas 2 description: AXDescription:
     9PASS platformValueForW3CName(axCanvas2) is ""
    1010Canvas 2 role: AXRole: AXImage
    1111PASS successfullyParsed is true
  • releases/WebKitGTK/webkit-2.12/LayoutTests/resources/accessibility-helper.js

    r184213 r204707  
    3333    return true;
    3434}
     35
     36function 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
     51function 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
     66function 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
     78function platformRoleForComboBox() {
     79    return accessibilityController.platformName == "atk" ? "AXRole: AXComboBox" : "AXRole: AXPopUpButton";
     80}
     81
     82function platformRoleForStaticText() {
     83    return accessibilityController.platformName == "atk" ? "AXRole: AXStatic" : "AXRole: AXStaticText";
     84}
  • releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog

    r201285 r204707  
     12016-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
    1412016-03-17  Brent Fulgham  <bfulgham@apple.com>
    242
  • releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r201270 r204707  
    109109    returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(object), 0);
    110110
    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, "");
    159129}
    160130
     
    164134    returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(object), 0);
    165135
    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, "");
    187156}
    188157
  • releases/WebKitGTK/webkit-2.12/Tools/ChangeLog

    r201270 r204707  
     12016-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
    1142016-05-11  Joanmarie Diggs  <jdiggs@igalia.com>
    215
  • releases/WebKitGTK/webkit-2.12/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

    r201270 r204707  
    12181218    AtkRelationSet* relationSet = atk_object_ref_relation_set(ATK_OBJECT(m_element.get()));
    12191219    if (!relationSet)
    1220         return nullptr;
     1220        return JSStringCreateWithCharacters(0, 0);
    12211221
    12221222    AtkRelation* relation = atk_relation_set_get_relation_by_type(relationSet, ATK_RELATION_DESCRIBED_BY);
    12231223    if (!relation)
    1224         return nullptr;
     1224        return JSStringCreateWithCharacters(0, 0);
    12251225
    12261226    GPtrArray* targetList = atk_relation_get_target(relation);
    12271227    if (!targetList || !targetList->len)
    1228         return nullptr;
     1228        return JSStringCreateWithCharacters(0, 0);
    12291229
    12301230    StringBuilder builder;
Note: See TracChangeset for help on using the changeset viewer.