Title: [158104] trunk
Revision
158104
Author
[email protected]
Date
2013-10-28 02:57:48 -0700 (Mon, 28 Oct 2013)

Log Message

[GTK] Expose title and alternative text for links in image maps
https://bugs.webkit.org/show_bug.cgi?id=84045

Reviewed by Chris Fleizach.

Source/WebCore:

Change the way we decide when the title attribute should be
used for the accessible description, by not relying in the
titleTagShouldBeUsedInDescriptionField() helper function but
in whether we have found a visible text for it or not.

This actually mimics what the Mac port does and so makes possible
to share both the layout test and its expected results.

* accessibility/atk/WebKitAccessibleUtil.cpp:
(accessibilityDescription): Update the method to determine
whether the title attribute should be used for the description.

LayoutTests:

Share test expectations among Mac, GTK and EFL ports and
remove expected failures for GTK and EFL.

* accessibility/image-map1-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/image-map1-expected.txt.
* platform/gtk/accessibility/image-map1-expected.txt: Removed.
* platform/efl/TestExpectations: Removed failure expectations.
* platform/gtk/TestExpectations: Ditto.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (158103 => 158104)


--- trunk/LayoutTests/ChangeLog	2013-10-28 09:29:14 UTC (rev 158103)
+++ trunk/LayoutTests/ChangeLog	2013-10-28 09:57:48 UTC (rev 158104)
@@ -1,3 +1,18 @@
+2013-10-28  Mario Sanchez Prada  <[email protected]>
+
+        [GTK] Expose title and alternative text for links in image maps
+        https://bugs.webkit.org/show_bug.cgi?id=84045
+
+        Reviewed by Chris Fleizach.
+
+        Share test expectations among Mac, GTK and EFL ports and
+        remove expected failures for GTK and EFL.
+
+        * accessibility/image-map1-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/image-map1-expected.txt.
+        * platform/gtk/accessibility/image-map1-expected.txt: Removed.
+        * platform/efl/TestExpectations: Removed failure expectations.
+        * platform/gtk/TestExpectations: Ditto.
+
 2013-10-26  Simon Fraser  <[email protected]>
 
         Crashy WebGL test is crashy.

Copied: trunk/LayoutTests/accessibility/image-map1-expected.txt (from rev 158103, trunk/LayoutTests/platform/mac/accessibility/image-map1-expected.txt) (0 => 158104)


--- trunk/LayoutTests/accessibility/image-map1-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/image-map1-expected.txt	2013-10-28 09:57:48 UTC (rev 158104)
@@ -0,0 +1,22 @@
+ 
+This tests that you can reach the links within an image map.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Link1 role: AXRole: AXLink
+Link1 title: AXTitle: 
+Link1 description: AXDescription: Link1
+
+Link2 role: AXRole: AXLink
+Link2 title: AXTitle: 
+Link2 description: AXDescription: Link2
+
+Link3 role: AXRole: AXLink
+Link3 title: AXTitle: 
+Link3 description: AXDescription: Link3
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/LayoutTests/platform/efl/TestExpectations (158103 => 158104)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-10-28 09:29:14 UTC (rev 158103)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-10-28 09:57:48 UTC (rev 158104)
@@ -1413,7 +1413,6 @@
 webkit.org/b/115659 accessibility/meter-element.html [ Missing ]
 
 webkit.org/b/121684 accessibility/aria-describedby-on-input.html [ Failure ]
-webkit.org/b/84045 accessibility/image-map1.html [ Failure ]
 webkit.org/b/121593 accessibility/radio-button-title-label.html [ Failure ]
 
 # Newly added test at r139111 is failing.

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (158103 => 158104)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-10-28 09:29:14 UTC (rev 158103)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-10-28 09:57:48 UTC (rev 158104)
@@ -1403,8 +1403,6 @@
 webkit.org/b/120596 css3/masking/mask-repeat-space-content.html [ ImageOnlyFailure ]
 webkit.org/b/120596 css3/masking/mask-repeat-space-padding.html [ ImageOnlyFailure ]
 
-webkit.org/b/84045 accessibility/image-map1.html [ Failure ]
-
 webkit.org/b/120836 fast/regions/text-region-split-vertical-rl.html [ Failure ]
 
 webkit.org/b/120839 animations/cross-fade-background-image.html [ ImageOnlyFailure ]

Deleted: trunk/LayoutTests/platform/gtk/accessibility/image-map1-expected.txt (158103 => 158104)


--- trunk/LayoutTests/platform/gtk/accessibility/image-map1-expected.txt	2013-10-28 09:29:14 UTC (rev 158103)
+++ trunk/LayoutTests/platform/gtk/accessibility/image-map1-expected.txt	2013-10-28 09:57:48 UTC (rev 158104)
@@ -1,16 +0,0 @@
- 
-This tests that you can reach the links within an image map.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS body.childAtIndex(0).role is 'AXRole: AXLink'
-FAIL body.childAtIndex(0).title should be AXTitle: Link1. Was AXTitle: .
-PASS body.childAtIndex(1).role is 'AXRole: AXLink'
-FAIL body.childAtIndex(1).title should be AXTitle: Link2. Was AXTitle: .
-PASS body.childAtIndex(2).role is 'AXRole: AXLink'
-FAIL body.childAtIndex(2).title should be AXTitle: Link3. Was AXTitle: .
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/platform/mac/accessibility/image-map1-expected.txt (158103 => 158104)


--- trunk/LayoutTests/platform/mac/accessibility/image-map1-expected.txt	2013-10-28 09:29:14 UTC (rev 158103)
+++ trunk/LayoutTests/platform/mac/accessibility/image-map1-expected.txt	2013-10-28 09:57:48 UTC (rev 158104)
@@ -1,22 +0,0 @@
- 
-This tests that you can reach the links within an image map.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Link1 role: AXRole: AXLink
-Link1 title: AXTitle: 
-Link1 description: AXDescription: Link1
-
-Link2 role: AXRole: AXLink
-Link2 title: AXTitle: 
-Link2 description: AXDescription: Link2
-
-Link3 role: AXRole: AXLink
-Link3 title: AXTitle: 
-Link3 description: AXDescription: Link3
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Modified: trunk/Source/WebCore/ChangeLog (158103 => 158104)


--- trunk/Source/WebCore/ChangeLog	2013-10-28 09:29:14 UTC (rev 158103)
+++ trunk/Source/WebCore/ChangeLog	2013-10-28 09:57:48 UTC (rev 158104)
@@ -1,3 +1,22 @@
+2013-10-28  Mario Sanchez Prada  <[email protected]>
+
+        [GTK] Expose title and alternative text for links in image maps
+        https://bugs.webkit.org/show_bug.cgi?id=84045
+
+        Reviewed by Chris Fleizach.
+
+        Change the way we decide when the title attribute should be
+        used for the accessible description, by not relying in the
+        titleTagShouldBeUsedInDescriptionField() helper function but
+        in whether we have found a visible text for it or not.
+
+        This actually mimics what the Mac port does and so makes possible
+        to share both the layout test and its expected results.
+
+        * accessibility/atk/WebKitAccessibleUtil.cpp:
+        (accessibilityDescription): Update the method to determine
+        whether the title attribute should be used for the description.
+
 2013-10-28  Bastien Nocera <[email protected]>
 
         Replace 0 timeouts g_timeout_add() by g_idle_add()

Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleUtil.cpp (158103 => 158104)


--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleUtil.cpp	2013-10-28 09:29:14 UTC (rev 158103)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleUtil.cpp	2013-10-28 09:57:48 UTC (rev 158104)
@@ -125,13 +125,23 @@
     coreObject->accessibilityText(textOrder);
 
     unsigned length = textOrder.size();
+    bool visibleTextAvailable = false;
     for (unsigned k = 0; k < length; k++) {
         const AccessibilityText& text = textOrder[k];
 
         if (text.textSource == AlternativeText)
             return text.text;
 
-        if (text.textSource == TitleTagText && titleTagShouldBeUsedInDescriptionField(coreObject))
+        switch (text.textSource) {
+        case VisibleText:
+        case ChildrenText:
+        case LabelByElementText:
+            visibleTextAvailable = true;
+        default:
+            break;
+        }
+
+        if (text.textSource == TitleTagText && !visibleTextAvailable)
             return text.text;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to