Unreviewed, rolling out r246320.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2019 23:40:08 +0000 (23:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2019 23:40:08 +0000 (23:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=198773

New test is failing, and commit is causing another test to
fail. (Requested by ShawnRoberts on #webkit).

Reverted changeset:

"Web Inspector: AXI: Audit: image label test is throwing
spurious errors on elements with existing alt attr, but no
value: <img alt>"
https://bugs.webkit.org/show_bug.cgi?id=194754
https://trac.webkit.org/changeset/246320

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246340 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/img-alt-attribute-empty-string-expected.txt [deleted file]
LayoutTests/accessibility/img-alt-attribute-empty-string.html [deleted file]
LayoutTests/accessibility/img-alt-attribute-no-value-expected.txt [deleted file]
LayoutTests/accessibility/img-alt-attribute-no-value.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp

index cd695a6..2bdb406 100644 (file)
@@ -1,3 +1,19 @@
+2019-06-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r246320.
+        https://bugs.webkit.org/show_bug.cgi?id=198773
+
+        New test is failing, and commit is causing another test to
+        fail. (Requested by ShawnRoberts on #webkit).
+
+        Reverted changeset:
+
+        "Web Inspector: AXI: Audit: image label test is throwing
+        spurious errors on elements with existing alt attr, but no
+        value: <img alt>"
+        https://bugs.webkit.org/show_bug.cgi?id=194754
+        https://trac.webkit.org/changeset/246320
+
 2019-06-11  Devin Rousso  <drousso@apple.com>
 
         Sort the computed styles list
diff --git a/LayoutTests/accessibility/img-alt-attribute-empty-string-expected.txt b/LayoutTests/accessibility/img-alt-attribute-empty-string-expected.txt
deleted file mode 100644 (file)
index 29d0074..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-This tests that img elements with alt attribute of empty string are ignored.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS imagesGroup.childrenCount is 2
-PASS platformValueForW3CName(imagesGroup.childAtIndex(0)) is "cake"
-PASS platformValueForW3CName(imagesGroup.childAtIndex(1)) is "more cake"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/accessibility/img-alt-attribute-empty-string.html b/LayoutTests/accessibility/img-alt-attribute-empty-string.html
deleted file mode 100644 (file)
index e691573..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../resources/js-test-pre.js"></script>
-<script src="../resources/accessibility-helper.js"></script>
-</head>
-<body id="body">
-
-<div tabindex="0" role="group" id="images">
-    <img alt="cake" src="resources/cake.png"><br>
-    <img alt="" src="resources/cake.png" class="empty-string"><br>
-    <img alt="more cake" src="resources/cake.png"><br>
-</div>
-
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-
-    description("This tests that img elements with alt attribute of empty string are ignored.");
-
-    if (window.accessibilityController) {
-
-        document.getElementById("images").focus();
-        var imagesGroup = accessibilityController.focusedElement;
-        // <img alt="" /> should be ignored, so the count should be 2:
-        shouldBe("imagesGroup.childrenCount", "2"); 
-        // make sure alt text is being read before and after
-        shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(0))", "cake");
-        shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(1))", "more cake");
-    }
-
-</script>
-
-<script src="../resources/js-test-post.js"></script>
-</body>
-</html>
-
diff --git a/LayoutTests/accessibility/img-alt-attribute-no-value-expected.txt b/LayoutTests/accessibility/img-alt-attribute-no-value-expected.txt
deleted file mode 100644 (file)
index 392d42a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-This tests that img elements with an alt attribute and no assigned value are ignored.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS imagesGroup.childrenCount is 2
-PASS platformValueForW3CName(imagesGroup.childAtIndex(0)) is "cake0"
-PASS platformValueForW3CName(imagesGroup.childAtIndex(1)) is "cake3"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/accessibility/img-alt-attribute-no-value.html b/LayoutTests/accessibility/img-alt-attribute-no-value.html
deleted file mode 100644 (file)
index 73bd741..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../resources/js-test-pre.js"></script>
-<script src="../resources/accessibility-helper.js"></script>
-</head>
-<body id="body">
-
-<div tabindex="0" role="group" id="images">
-    <img alt="cake0" src="resources/cake.png"><br>
-    <img alt class="unassigned-alt cake1" src="resources/cake.png"><br>
-    <img class="no-alt cake2" src="resources/cake.png"><br>
-    <img alt="cake3" src="resources/cake.png"><br>
-</div>
-
-<p id="description"></p>
-<div id="console"></div>
-
-<script>
-
-description("This tests that img elements with an alt attribute and no assigned value are ignored.");
-if (window.accessibilityController) {
-    document.getElementById("images").focus();
-    var imagesGroup = accessibilityController.focusedElement;
-    // there are 4 images, but one has an alt attribute that is unassigned so it should be
-    // ignored. there is a second image without any alt attribute at all. this image should
-    // not be ignored. accessibilityController fails to recognize it. this has been
-    // documented in <rdar://problem/51283943>.
-    // as a result the image count is 2, but it should be 3.
-    shouldBe("imagesGroup.childrenCount", "2");
-    // make sure alt text is being read before and after
-    shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(0))", "cake0");
-    // accessiblityController should see the <img> element w/o alt attribute as an image,
-    // but it erroneously classifies it as presentation.. so it won't find the image and use the filename as alt text
-    // shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(2))", "cake.png");
-    shouldBeEqualToString("platformValueForW3CName(imagesGroup.childAtIndex(1))", "cake3");
-}
-
-</script>
-
-<script src="../resources/js-test-post.js"></script>
-</body>
-</html>
-
index 8f84085..30759fa 100644 (file)
@@ -1,3 +1,19 @@
+2019-06-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r246320.
+        https://bugs.webkit.org/show_bug.cgi?id=198773
+
+        New test is failing, and commit is causing another test to
+        fail. (Requested by ShawnRoberts on #webkit).
+
+        Reverted changeset:
+
+        "Web Inspector: AXI: Audit: image label test is throwing
+        spurious errors on elements with existing alt attr, but no
+        value: <img alt>"
+        https://bugs.webkit.org/show_bug.cgi?id=194754
+        https://trac.webkit.org/changeset/246320
+
 2019-06-11  Devin Rousso  <drousso@apple.com>
 
         Sort the computed styles list
index 541acce..56cb15b 100644 (file)
@@ -2493,9 +2493,6 @@ String AccessibilityObject::computedRoleString() const
     // FIXME: Need a few special cases that aren't in the RoleMap: option, etc. http://webkit.org/b/128296
     AccessibilityRole role = roleValue();
 
-    if (accessibilityIsIgnored())
-        return reverseAriaRoleMap().get(static_cast<int>(AccessibilityRole::Presentational));
-
     // We do not compute a role string for generic block elements with user-agent assigned roles.
     if (role == AccessibilityRole::Group || role == AccessibilityRole::TextGroup)
         return "";