<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[182355] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/182355">182355</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2015-04-04 23:51:15 -0700 (Sat, 04 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an AXElement with more than one descendant AXElement
https://bugs.webkit.org/show_bug.cgi?id=136247

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Modify the logic for determining whether an element supports the press action by trying to filter out objects being handled by event delegation.
The heuristic is if an element handles click actions and has more than one of a {static text, image, control, link, heading}, then we think
it's using event delegation, and do not expose the press action.

Test: platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsPressAction):

LayoutTests:

* platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt: Removed.
* platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html: Removed.
* platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt: Added.
* platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedforeventdelegationexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedforeventdelegationhtml">trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedwhenbodyisclickhandlerexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedwhenbodyisclickhandlerhtml">trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182354 => 182355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-05 06:11:00 UTC (rev 182354)
+++ trunk/LayoutTests/ChangeLog        2015-04-05 06:51:15 UTC (rev 182355)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-04-04  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an AXElement with more than one descendant AXElement
+        https://bugs.webkit.org/show_bug.cgi?id=136247
+
+        Reviewed by Mario Sanchez Prada.
+
+        * platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt: Removed.
+        * platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html: Removed.
+        * platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt: Added.
+        * platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html: Added.
+
</ins><span class="cx"> 2015-04-04  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix some bad test results committed earlier.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedforeventdelegationexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt (0 => 182355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt        2015-04-05 06:51:15 UTC (rev 182355)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+
+
+This tests whether static text has the press action supported. If the handler is on an element that has more than one child, then we assume that event delegation is being used. In that case we do not expose press supported.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS text1.role is 'AXRole: AXStaticText'
+PASS text2.role is 'AXRole: AXStaticText'
+When a click handler is on the HTML tag, AXPress should not be supported on static text children elements automatically.
+PASS text1.isPressActionSupported() is false
+PASS text2.isPressActionSupported() is false
+
+When a click handler is on the BODY tag, AXPress should not be supported on static text children elements automatically.
+
+PASS text1.isPressActionSupported() is false
+PASS text2.isPressActionSupported() is false
+
+When a click handler is on a parent tag, AXPress should be supported on static text children elements automatically.
+
+PASS text1.isPressActionSupported() is true
+PASS text2.isPressActionSupported() is false
+
+When a click handler is on the parent, using role=text should expose AXPress.
+
+PASS text2.isPressActionSupported() is true
+
+When a click handler is on a parent that has more than one descendant, do not expose press.
+
+PASS text3.isPressActionSupported() is false
+PASS text3.isPressActionSupported() is false
+
+When a click handler is on a parent that has one direct descendant, but then sub-descendants below that, do not expose press.
+
+PASS text4.isPressActionSupported() is false
+PASS text4.isPressActionSupported() is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedforeventdelegationhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html (0 => 182355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html        2015-04-05 06:51:15 UTC (rev 182355)
</span><span class="lines">@@ -0,0 +1,97 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html id=&quot;html&quot;&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+&lt;div id=&quot;group1&quot; role=&quot;group&quot;&gt;
+text1
+&lt;/div&gt;
+
+&lt;br&gt;
+
+&lt;div id=&quot;group2&quot; role=&quot;group&quot;&gt;
+&lt;div role=&quot;text&quot; id=&quot;text2&quot;&gt;text2&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div id=&quot;group3&quot; role=&quot;group&quot;&gt;
+a&lt;br&gt;
+&lt;button&gt;b&lt;/button&gt;
+&lt;/div&gt;
+
+&lt;div id=&quot;group4&quot; role=&quot;group&quot;&gt;
+  &lt;div role=&quot;group&quot;&gt;
+     &lt;button&gt;a&lt;/button&gt;
+     &lt;button&gt;b&lt;/button&gt;
+     c
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/div&gt;
+
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;This tests whether static text has the press action supported. If the handler is on an element that has more than one child, then we assume that event delegation is being used. In that case we do not expose press supported.&quot;);
+
+    if (window.accessibilityController) {
+
+          function listener() { }
+
+          var group = accessibilityController.accessibleElementById(&quot;group1&quot;);
+          var text1 = group.childAtIndex(0);
+          var text2 = accessibilityController.accessibleElementById(&quot;text2&quot;);
+
+          shouldBe(&quot;text1.role&quot;, &quot;'AXRole: AXStaticText'&quot;);
+          shouldBe(&quot;text2.role&quot;, &quot;'AXRole: AXStaticText'&quot;);
+
+          document.getElementById(&quot;html&quot;).addEventListener('click', listener, false);
+
+          debug(&quot;When a click handler is on the HTML tag, AXPress should not be supported on static text children elements automatically.&quot;);
+          shouldBeFalse(&quot;text1.isPressActionSupported()&quot;);
+          shouldBeFalse(&quot;text2.isPressActionSupported()&quot;);
+
+          document.getElementById(&quot;html&quot;).removeEventListener('click', listener, false);
+          document.getElementById(&quot;body&quot;).addEventListener('click', listener, false);
+
+          debug(&quot;\nWhen a click handler is on the BODY tag, AXPress should not be supported on static text children elements automatically.\n&quot;);
+          shouldBeFalse(&quot;text1.isPressActionSupported()&quot;);
+          shouldBeFalse(&quot;text2.isPressActionSupported()&quot;);
+
+          document.getElementById(&quot;body&quot;).removeEventListener('click', listener, false);
+          document.getElementById(&quot;group1&quot;).addEventListener('click', listener, false);
+
+          debug(&quot;\nWhen a click handler is on a parent tag, AXPress should be supported on static text children elements automatically.\n&quot;);
+          shouldBeTrue(&quot;text1.isPressActionSupported()&quot;);
+          shouldBeFalse(&quot;text2.isPressActionSupported()&quot;);
+
+          debug(&quot;\nWhen a click handler is on the parent, using role=text should expose AXPress.\n&quot;);
+          document.getElementById(&quot;group2&quot;).addEventListener('click', listener, false);
+          shouldBeTrue(&quot;text2.isPressActionSupported()&quot;);
+
+          debug(&quot;\nWhen a click handler is on a parent that has more than one descendant, do not expose press.\n&quot;);
+          var text3 = accessibilityController.accessibleElementById('group3').childAtIndex(0);
+          shouldBeFalse(&quot;text3.isPressActionSupported()&quot;);
+
+          document.getElementById(&quot;group3&quot;).addEventListener('click', listener, false);
+          shouldBeFalse(&quot;text3.isPressActionSupported()&quot;);
+
+          debug(&quot;\nWhen a click handler is on a parent that has one direct descendant, but then sub-descendants below that, do not expose press.\n&quot;);
+          var text4 = accessibilityController.accessibleElementById('group4').childAtIndex(0).childAtIndex(2);
+          shouldBeFalse(&quot;text4.isPressActionSupported()&quot;);
+
+          document.getElementById(&quot;group4&quot;).addEventListener('click', listener, false);
+          shouldBeFalse(&quot;text4.isPressActionSupported()&quot;);
+
+          for (var k = 1; k &lt;= 4; k++)
+              document.getElementById(&quot;group&quot; + k).style.visibility = &quot;hidden&quot;;
+    }
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedwhenbodyisclickhandlerexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt (182354 => 182355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt        2015-04-05 06:11:00 UTC (rev 182354)
+++ trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt        2015-04-05 06:51:15 UTC (rev 182355)
</span><span class="lines">@@ -1,21 +0,0 @@
</span><del>-
-This tests that if the body or html tags have click handlers, then non-control elements do not automatically have the press action on them.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS text1.role is 'AXRole: AXStaticText'
-PASS text2.role is 'AXRole: AXStaticText'
-When a click handler is on the HTML tag, AXPress should not be supported on static text children elements automatically.
-PASS text1.isPressActionSupported() is false
-PASS text2.isPressActionSupported() is false
-When a click handler is on the BODY tag, AXPress should not be supported on static text children elements automatically.
-PASS text1.isPressActionSupported() is false
-PASS text2.isPressActionSupported() is false
-When a click handler is on a parent tag, AXPress should be supported on static text children elements automatically.
-PASS text1.isPressActionSupported() is true
-PASS text2.isPressActionSupported() is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitypressactionnotexposedwhenbodyisclickhandlerhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html (182354 => 182355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html        2015-04-05 06:11:00 UTC (rev 182354)
+++ trunk/LayoutTests/platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html        2015-04-05 06:51:15 UTC (rev 182355)
</span><span class="lines">@@ -1,60 +0,0 @@
</span><del>-&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
-&lt;html id=&quot;html&quot;&gt;
-&lt;head&gt;
-&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body id=&quot;body&quot;&gt;
-
-&lt;div id=&quot;group1&quot; role=&quot;group&quot;&gt;
-text1
-&lt;br&gt;
-&lt;div role=&quot;text&quot; id=&quot;text2&quot;&gt;text2&lt;/div&gt;
-
-&lt;/div&gt;
-
-&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
-&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
-
-&lt;script&gt;
-
-    description(&quot;This tests that if the body or html tags have click handlers, then non-control elements do not automatically have the press action on them.&quot;);
-
-    if (window.accessibilityController) {
-
-          function listener() { }
-
-          var group = accessibilityController.accessibleElementById(&quot;group1&quot;);
-          var text1 = group.childAtIndex(0).childAtIndex(0);
-          var text2 = accessibilityController.accessibleElementById(&quot;text2&quot;);
-
-          shouldBe(&quot;text1.role&quot;, &quot;'AXRole: AXStaticText'&quot;);
-          shouldBe(&quot;text2.role&quot;, &quot;'AXRole: AXStaticText'&quot;);
-
-          document.getElementById(&quot;html&quot;).addEventListener('click', listener, false);
-
-          debug(&quot;When a click handler is on the HTML tag, AXPress should not be supported on static text children elements automatically.&quot;);
-          shouldBeFalse(&quot;text1.isPressActionSupported()&quot;);
-          shouldBeFalse(&quot;text2.isPressActionSupported()&quot;);
-
-          document.getElementById(&quot;html&quot;).removeEventListener('click', listener, false);
-          document.getElementById(&quot;body&quot;).addEventListener('click', listener, false);
-
-          debug(&quot;When a click handler is on the BODY tag, AXPress should not be supported on static text children elements automatically.&quot;);
-          shouldBeFalse(&quot;text1.isPressActionSupported()&quot;);
-          shouldBeFalse(&quot;text2.isPressActionSupported()&quot;);
-
-          document.getElementById(&quot;body&quot;).removeEventListener('click', listener, false);
-          document.getElementById(&quot;group1&quot;).addEventListener('click', listener, false);
-
-          debug(&quot;When a click handler is on a parent tag, AXPress should be supported on static text children elements automatically.&quot;);
-          shouldBeTrue(&quot;text1.isPressActionSupported()&quot;);
-          shouldBeTrue(&quot;text2.isPressActionSupported()&quot;);
-
-          document.getElementById(&quot;group1&quot;).style.visibility = &quot;hidden&quot;;
-    }
-
-&lt;/script&gt;
-
-&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (182354 => 182355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-05 06:11:00 UTC (rev 182354)
+++ trunk/Source/WebCore/ChangeLog        2015-04-05 06:51:15 UTC (rev 182355)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-04-04  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an AXElement with more than one descendant AXElement
+        https://bugs.webkit.org/show_bug.cgi?id=136247
+
+        Reviewed by Mario Sanchez Prada.
+
+        Modify the logic for determining whether an element supports the press action by trying to filter out objects being handled by event delegation.
+        The heuristic is if an element handles click actions and has more than one of a {static text, image, control, link, heading}, then we think
+        it's using event delegation, and do not expose the press action.
+
+        Test: platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::supportsPressAction):
+
</ins><span class="cx"> 2015-04-04  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         More const in CSSToStyleMap
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (182354 => 182355)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2015-04-05 06:11:00 UTC (rev 182354)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2015-04-05 06:51:15 UTC (rev 182355)
</span><span class="lines">@@ -2002,6 +2002,21 @@
</span><span class="cx">     if (!actionElement)
</span><span class="cx">         return false;
</span><span class="cx">     
</span><ins>+    // [Bug: 136247] Heuristic: element handlers that have more than one accessible descendant should not be exposed as supporting press.
+    if (actionElement != element()) {
+        if (AccessibilityObject* axObj = axObjectCache()-&gt;getOrCreate(actionElement)) {
+            AccessibilityChildrenVector results;
+            // Search within for immediate descendants that are static text. If we find more than one
+            // then this is an event delegator actionElement and we should expose the press action.
+            Vector&lt;AccessibilitySearchKey&gt; keys({ StaticTextSearchKey, ControlSearchKey, GraphicSearchKey, HeadingSearchKey, LinkSearchKey });
+            AccessibilitySearchCriteria criteria(axObj, SearchDirectionNext, &quot;&quot;, 2, false, false);
+            criteria.searchKeys = keys;
+            axObj-&gt;findMatchingObjects(&amp;criteria, results);
+            if (results.size() &gt; 1)
+                return false;
+        }
+    }
+    
</ins><span class="cx">     // [Bug: 133613] Heuristic: If the action element is presentational, we shouldn't expose press as a supported action.
</span><span class="cx">     return !nodeHasPresentationRole(actionElement);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>