Title: [265645] trunk
- Revision
- 265645
- Author
- [email protected]
- Date
- 2020-08-13 22:33:38 -0700 (Thu, 13 Aug 2020)
Log Message
VoiceOver not able to invoke play button on some web sites.
https://bugs.webkit.org/show_bug.cgi?id=215484
<rdar://problem/62729643>
Reviewed by Chris Fleizach.
Source/WebCore:
Test: accessibility/ios-simulator/has-touch-event-listener.html.
We were checking for the presence of listeners for touchstart and touchend
events only. Now we check for the presence of any touch-related event listener.
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::hasTouchEventListener const):
LayoutTests:
Expanded this test to check for all touch-related event listeners.
* accessibility/ios-simulator/has-touch-event-listener-expected.txt:
* accessibility/ios-simulator/has-touch-event-listener.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (265644 => 265645)
--- trunk/LayoutTests/ChangeLog 2020-08-14 05:01:49 UTC (rev 265644)
+++ trunk/LayoutTests/ChangeLog 2020-08-14 05:33:38 UTC (rev 265645)
@@ -1,3 +1,16 @@
+2020-08-13 Andres Gonzalez <[email protected]>
+
+ VoiceOver not able to invoke play button on some web sites.
+ https://bugs.webkit.org/show_bug.cgi?id=215484
+ <rdar://problem/62729643>
+
+ Reviewed by Chris Fleizach.
+
+ Expanded this test to check for all touch-related event listeners.
+
+ * accessibility/ios-simulator/has-touch-event-listener-expected.txt:
+ * accessibility/ios-simulator/has-touch-event-listener.html:
+
2020-08-13 Lauro Moura <[email protected]>
[GTK] Gardening
Modified: trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-expected.txt (265644 => 265645)
--- trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-expected.txt 2020-08-14 05:01:49 UTC (rev 265644)
+++ trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-expected.txt 2020-08-14 05:33:38 UTC (rev 265645)
@@ -1,12 +1,88 @@
button
link
-Makes sure that we can check if an AXObject has touch event listener.
+Makes sure that we can check if an AXObject has touch event listeners.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS button.boolAttributeValue('AXHasTouchEventListener') is true
-PASS link.boolAttributeValue('AXHasTouchEventListener') is true
+After adding event listener for touchstart
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for touchstart
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for touchmove
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for touchmove
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for touchend
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for touchend
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for touchcancel
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for touchcancel
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for touchforcechange
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for touchforcechange
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointerover
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointerover
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointerenter
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointerenter
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointerdown
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointerdown
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointermove
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointermove
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointerup
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointerup
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointerout
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointerout
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointerleave
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointerleave
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
+After adding event listener for pointercancel
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is true
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is true
+After removing event listener for pointercancel
+PASS axButton.boolAttributeValue('AXHasTouchEventListener') is false
+PASS axLink.boolAttributeValue('AXHasTouchEventListener') is false
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener.html (265644 => 265645)
--- trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener.html 2020-08-14 05:01:49 UTC (rev 265644)
+++ trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener.html 2020-08-14 05:33:38 UTC (rev 265645)
@@ -3,38 +3,46 @@
<head>
<script src=""
<script>
-var successfullyParsed = false;
if (window.testRunner)
testRunner.dumpAsText();
function click() {}
-
</script>
</head>
<body>
-<div role="button" id="button" _ontouchstart_="chick();"">button</div>
-<div role="link" _ontouchend_="chick();"><div id="link">link</div></div>
+<div role="button" id="button">button</div>
+<div role="link"><div id="link">link</div></div>
<p id="description"></p>
<div id="console"></div>
<script>
+ description("Makes sure that we can check if an AXObject has touch event listeners.");
- description("Makes sure that we can check if an AXObject has touch event listener.");
+ if (window.accessibilityController) {
+ var eventNames = [ "touchstart", "touchmove", "touchend", "touchcancel", "touchforcechange", "pointerover", "pointerenter", "pointerdown", "pointermove", "pointerup", "pointerout", "pointerleave", "pointercancel" ];
- if (window.accessibilityController) {
- var button = accessibilityController.accessibleElementById("button");
- var link = accessibilityController.accessibleElementById("link");
- shouldBeTrue("button.boolAttributeValue('AXHasTouchEventListener')");
- shouldBeTrue("link.boolAttributeValue('AXHasTouchEventListener')");
+ var button = document.getElementById("button");
+ var link = document.getElementById("link");
+ var axButton = accessibilityController.accessibleElementById("button");
+ var axLink = accessibilityController.accessibleElementById("link");
+
+ for (i = 0; i < eventNames.length; ++i) {
+ button.addEventListener(eventNames[i], click);
+ link.addEventListener(eventNames[i], click);
+ debug("After adding event listener for " + eventNames[i]);
+ shouldBeTrue("axButton.boolAttributeValue('AXHasTouchEventListener')");
+ shouldBeTrue("axLink.boolAttributeValue('AXHasTouchEventListener')");
+
+ button.removeEventListener(eventNames[i], click);
+ link.removeEventListener(eventNames[i], click);
+ debug("After removing event listener for " + eventNames[i]);
+ shouldBeFalse("axButton.boolAttributeValue('AXHasTouchEventListener')");
+ shouldBeFalse("axLink.boolAttributeValue('AXHasTouchEventListener')");
+ }
}
-
- successfullyParsed = true;
</script>
-
<script src=""
-
</body>
</html>
-
Modified: trunk/Source/WebCore/ChangeLog (265644 => 265645)
--- trunk/Source/WebCore/ChangeLog 2020-08-14 05:01:49 UTC (rev 265644)
+++ trunk/Source/WebCore/ChangeLog 2020-08-14 05:33:38 UTC (rev 265645)
@@ -1,3 +1,19 @@
+2020-08-13 Andres Gonzalez <[email protected]>
+
+ VoiceOver not able to invoke play button on some web sites.
+ https://bugs.webkit.org/show_bug.cgi?id=215484
+ <rdar://problem/62729643>
+
+ Reviewed by Chris Fleizach.
+
+ Test: accessibility/ios-simulator/has-touch-event-listener.html.
+
+ We were checking for the presence of listeners for touchstart and touchend
+ events only. Now we check for the presence of any touch-related event listener.
+
+ * accessibility/ios/AccessibilityObjectIOS.mm:
+ (WebCore::AccessibilityObject::hasTouchEventListener const):
+
2020-08-13 Dean Jackson <[email protected]>
Pocket City game play area is blank (WebGL is broken in Catalyst)
Modified: trunk/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm (265644 => 265645)
--- trunk/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm 2020-08-14 05:01:49 UTC (rev 265644)
+++ trunk/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm 2020-08-14 05:33:38 UTC (rev 265645)
@@ -82,13 +82,19 @@
bool AccessibilityObject::hasTouchEventListener() const
{
+ // Check whether this->node or any of its ancestors has any of the touch-related event listeners.
+ auto touchEventNames = eventNames().touchRelatedEventNames();
+ // If the node is in a shadowRoot, going up the node parent tree will stop and
+ // not check the entire chain of ancestors. Thus, use the parentInComposedTree instead.
for (auto* node = this->node(); node; node = node->parentInComposedTree()) {
- if (node->hasEventListeners(eventNames().touchstartEvent) || node->hasEventListeners(eventNames().touchendEvent))
- return true;
+ for (auto eventName : touchEventNames) {
+ if (node->hasEventListeners(eventName))
+ return true;
+ }
}
return false;
}
-
+
bool AccessibilityObject::isInputTypePopupButton() const
{
if (is<HTMLInputElement>(node()))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes