<!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>[284244] 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/284244">284244</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2021-10-15 07:32:36 -0700 (Fri, 15 Oct 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Return AXEmptyGroup subrole for groups with no accessible content
https://bugs.webkit.org/show_bug.cgi?id=231528

Patch by Tyler Wilcock <tyler_w@apple.com> on 2021-10-15
Reviewed by Andres Gonzalez.

Source/WebCore:

Return a subrole of "AXEmptyGroup" for groups without any exposed
children. WebKit can calculate this more efficiently than AX clients,
so it makes more sense to do here.

Test: accessibility/mac/empty-group-computation.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

* accessibility/mac/aria-divs-not-ignored-expected.txt:
* accessibility/mac/aria-divs-not-ignored.html:
Expect a subrole of AXEmptyGroup because this group has no content.

* accessibility/mac/empty-group-computation-expected.txt: Added.
* accessibility/mac/empty-group-computation.html: Added.

* platform/mac/accessibility/lists-expected.txt: Added.
* platform/mac/accessibility/plugin-expected.txt: Added.
Add these Mac-specific expectations for these tests because this patch
only causes Mac to expose the AXEmptyGroup subrole.

* platform/mac/accessibility/svg-element-with-aria-role-expected.txt:
Add an expected subrole of AXEmptyGroup.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacariadivsnotignoredexpectedtxt">trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacariadivsnotignoredhtml">trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitysvgelementwithariaroleexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/svg-element-with-aria-role-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitymacemptygroupcomputationexpectedtxt">trunk/LayoutTests/accessibility/mac/empty-group-computation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacemptygroupcomputationhtml">trunk/LayoutTests/accessibility/mac/empty-group-computation.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitylistsexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitypluginexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/plugin-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (284243 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2021-10-15 14:01:05 UTC (rev 284243)
+++ trunk/LayoutTests/ChangeLog 2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2021-10-15  Tyler Wilcock  <tyler_w@apple.com>
+
+        AX: Return AXEmptyGroup subrole for groups with no accessible content
+        https://bugs.webkit.org/show_bug.cgi?id=231528
+
+        Reviewed by Andres Gonzalez.
+
+        * accessibility/mac/aria-divs-not-ignored-expected.txt:
+        * accessibility/mac/aria-divs-not-ignored.html:
+        Expect a subrole of AXEmptyGroup because this group has no content.
+
+        * accessibility/mac/empty-group-computation-expected.txt: Added.
+        * accessibility/mac/empty-group-computation.html: Added.
+
+        * platform/mac/accessibility/lists-expected.txt: Added.
+        * platform/mac/accessibility/plugin-expected.txt: Added.
+        Add these Mac-specific expectations for these tests because this patch
+        only causes Mac to expose the AXEmptyGroup subrole.
+
+        * platform/mac/accessibility/svg-element-with-aria-role-expected.txt:
+        Add an expected subrole of AXEmptyGroup.
+
</ins><span class="cx"> 2021-10-15  Alan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [LFC][IFC] Do not break the word-wrap: break-word content on inline box boundary
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacariadivsnotignoredexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored-expected.txt (284243 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored-expected.txt   2021-10-15 14:01:05 UTC (rev 284243)
+++ trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored-expected.txt      2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS body.childAtIndex(1).role is 'AXRole: AXGroup'
</span><del>-PASS body.childAtIndex(1).subrole is 'AXSubrole: AXApplicationLog'
</del><ins>+PASS body.childAtIndex(1).subrole is 'AXSubrole: AXEmptyGroup'
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacariadivsnotignoredhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored.html (284243 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored.html   2021-10-15 14:01:05 UTC (rev 284243)
+++ trunk/LayoutTests/accessibility/mac/aria-divs-not-ignored.html      2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -20,7 +20,9 @@
</span><span class="cx">           document.getElementById("body").focus();
</span><span class="cx">           var body = accessibilityController.focusedElement;
</span><span class="cx">           shouldBe("body.childAtIndex(1).role", "'AXRole: AXGroup'");
</span><del>-          shouldBe("body.childAtIndex(1).subrole", "'AXSubrole: AXApplicationLog'");
</del><ins>+          // Because this div has nothing in it, we expect the AXEmptyGroup subrole. A role="log" element with
+          // content would have a different subrole (i.e. AXApplicationLog).
+          shouldBe("body.childAtIndex(1).subrole", "'AXSubrole: AXEmptyGroup'");
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacemptygroupcomputationexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/empty-group-computation-expected.txt (0 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/empty-group-computation-expected.txt                         (rev 0)
+++ trunk/LayoutTests/accessibility/mac/empty-group-computation-expected.txt    2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+This test ensures WebKit properly reports groups as empty (or not empty).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing element with ID: empty-group-with-title
+PASS group.subrole is 'AXSubrole: AXEmptyGroup'
+Testing element with ID: empty-div-with-label
+PASS group.subrole is 'AXSubrole: AXEmptyGroup'
+Testing element with ID: empty-group-with-title-and-br
+PASS group.subrole is 'AXSubrole: AXEmptyGroup'
+Testing element with ID: group-with-direct-text-descendant
+PASS group.subrole is 'AXSubrole: AXApplicationGroup'
+Testing element with ID: group-with-non-empty-div
+PASS group.subrole is 'AXSubrole: AXApplicationGroup'
+Testing element with ID: group-with-heading
+PASS group.subrole is 'AXSubrole: AXApplicationGroup'
+Testing element with ID: group-with-contenteditable
+PASS group.subrole is 'AXSubrole: AXApplicationGroup'
+Testing element with ID: group-with-empty-table
+PASS group.subrole is 'AXSubrole: AXApplicationGroup'
+Testing element with ID: group-with-nested-content
+PASS group.subrole is 'AXSubrole: AXApplicationGroup'
+Testing element with ID: group-with-image
+PASS group.subrole is 'AXSubrole: AXApplicationGroup'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacemptygroupcomputationhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/mac/empty-group-computation.html (0 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/empty-group-computation.html                         (rev 0)
+++ trunk/LayoutTests/accessibility/mac/empty-group-computation.html    2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<script src="../../resources/accessibility-helper.js"></script>
+</head>
+<body>
+
+<div id="content">
+    <div id="empty-group-with-title" role="group" title="Group title"></div>
+
+    <div id="empty-div-with-label" aria-label="Div label"></div>
+
+    <div id="empty-group-with-title-and-br" role="group" title="Group title">
+        <!-- BR tags are ignored, so include one here to ensure we skip ignored content. -->
+        <br />
+    </div>
+
+    <div id="group-with-direct-text-descendant" role="group" aria-label="Group label">
+        Child text
+    </div>
+
+    <div id="group-with-non-empty-div" role="group" title="Group title">
+        <div>
+            Group title
+        </div>
+    </div>
+
+    <div id="group-with-heading" role="group" aria-label="Group label">
+        <h1>
+            <div>Hello world</div>
+        </h1>
+    </div>
+
+    <div id="group-with-contenteditable" role="group" aria-label="Group label">
+        <div contenteditable="true"></div>
+    </div>
+
+    <div id="group-with-empty-table" role="group" aria-label="Group label">
+        <table>
+            <thead>
+            </thead>
+            <tbody>
+            </tbody>
+        </table>
+    </div>
+
+    <div id="group-with-nested-content" role="group" aria-label="Group label">
+        <!-- BR tags are ignored, so include one here to ensure we skip ignored content. -->
+        <br />
+        <div>
+            <div>
+                Text
+            </div>
+        </div>
+    </div>
+
+    <div id="group-with-image" role="group" aria-label="Group label">
+        <img src="resources/cake.png" onload="runTest()">
+    </div>
+</div>
+
+<script>
+    description("This test ensures WebKit properly reports groups as empty (or not empty).")
+
+    var group;
+    const runTest = () => {
+        if (window.accessibilityController) {
+            const groupShouldBeEmpty = (id, shouldBeEmpty) => {
+                group = accessibilityController.accessibleElementById(id);
+                debug(`Testing element with ID: ${id}`);
+                shouldBe("group.subrole", shouldBeEmpty ? "'AXSubrole: AXEmptyGroup'" : "'AXSubrole: AXApplicationGroup'");
+            };
+
+            groupShouldBeEmpty("empty-group-with-title", true);
+            groupShouldBeEmpty("empty-div-with-label", true);
+            groupShouldBeEmpty("empty-group-with-title-and-br", true);
+            groupShouldBeEmpty("group-with-direct-text-descendant", false);
+            groupShouldBeEmpty("group-with-non-empty-div", false);
+            groupShouldBeEmpty("group-with-heading", false);
+            groupShouldBeEmpty("group-with-contenteditable", false);
+            groupShouldBeEmpty("group-with-empty-table", false);
+            groupShouldBeEmpty("group-with-nested-content", false);
+            groupShouldBeEmpty("group-with-image", false);
+
+            document.getElementById("content").style.visibility = "hidden";
+        }
+    }
+</script>
+</body>
+</html>
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitylistsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt (0 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt                          (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt     2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -0,0 +1,429 @@
</span><ins>+test 1
+test 2
+test 1
+test 2
+term 1
+meaning 2
+term b
+meaning 1
+meaning 2
+
+
+
+
+AXRole: AXList
+AXSubrole: AXContentList
+AXRoleDescription: content list
+AXChildren: <array of size 2>
+AXHelp:
+AXParent: <AXList>
+AXSize: NSSize: {784, 36}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXList>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXList>
+AXEndTextMarker: <AXList>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXList>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXList>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXSelectedChildren: <array of size 0>
+AXVisibleChildren: <array of size 2>
+AXOrientation: AXVerticalOrientation
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXList
+AXSubrole: AXContentList
+AXRoleDescription: content list
+AXChildren: <array of size 2>
+AXHelp:
+AXParent: <AXList>
+AXSize: NSSize: {784, 36}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXList>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXList>
+AXEndTextMarker: <AXList>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXList>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXList>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXSelectedChildren: <array of size 0>
+AXVisibleChildren: <array of size 2>
+AXOrientation: AXVerticalOrientation
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXList
+AXSubrole: AXDescriptionList
+AXRoleDescription: description list
+AXChildren: <array of size 5>
+AXHelp:
+AXParent: <AXList>
+AXSize: NSSize: {784, 90}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXList>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXList>
+AXEndTextMarker: <AXList>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXList>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXList>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXSelectedChildren: (null)
+AXVisibleChildren: <array of size 5>
+AXOrientation: AXVerticalOrientation
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXGroup
+AXSubrole: AXEmptyGroup
+AXRoleDescription: group
+AXChildren: <array of size 0>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {784, 72}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+
+
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 2>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {729, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 2>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {729, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+
+
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 2>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {729, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXGroup
+AXSubrole: (null)
+AXRoleDescription: group
+AXChildren: <array of size 2>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {729, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+
+
+AXRole: AXGroup
+AXSubrole: AXTerm
+AXRoleDescription: term
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXGroup
+AXSubrole: AXDescription
+AXRoleDescription: description
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {729, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXGroup
+AXSubrole: AXTerm
+AXRoleDescription: term
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {769, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXGroup
+AXSubrole: AXDescription
+AXRoleDescription: description
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {729, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXElementBusy: 0
+
+------------
+AXRole: AXGroup
+AXSubrole: AXDescription
+AXRoleDescription: description
+AXChildren: <array of size 1>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {729, 18}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXElementBusy: 0
+
+------------
+
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitypluginexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/plugin-expected.txt (0 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/plugin-expected.txt                         (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/plugin-expected.txt    2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+
+AXRole: AXGroup
+AXSubrole: AXEmptyGroup
+AXRoleDescription: group
+AXChildren: <array of size 0>
+AXHelp:
+AXParent: <AXGroup>
+AXSize: NSSize: {784, 150}
+AXTitle:
+AXDescription:
+AXValue:
+AXFocused: 0
+AXEnabled: 1
+AXWindow: <AXGroup>
+AXSelectedTextMarkerRange: (null)
+AXStartTextMarker: <AXGroup>
+AXEndTextMarker: <AXGroup>
+AXVisited: 0
+AXLinkedUIElements: <array of size 0>
+AXSelected: 0
+AXBlockQuoteLevel: 0
+AXTopLevelUIElement: <AXGroup>
+AXLanguage:
+AXDOMIdentifier:
+AXDOMClassList: <array of size 0>
+AXFocusableAncestor: <AXGroup>
+AXEditableAncestor: (null)
+AXHighestEditableAncestor: (null)
+AXTitleUIElement: (null)
+AXElementBusy: 0
+
+------------
+
+
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitysvgelementwithariaroleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/svg-element-with-aria-role-expected.txt (284243 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/svg-element-with-aria-role-expected.txt     2021-10-15 14:01:05 UTC (rev 284243)
+++ trunk/LayoutTests/platform/mac/accessibility/svg-element-with-aria-role-expected.txt        2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> test1: AXRole: AXGroup AXSubrole: AXDocument
</span><del>-test2: AXRole: AXGroup AXSubrole:
</del><ins>+test2: AXRole: AXGroup AXSubrole: AXEmptyGroup
</ins><span class="cx"> test3: AXRole: AXButton AXSubrole:
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (284243 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-10-15 14:01:05 UTC (rev 284243)
+++ trunk/Source/WebCore/ChangeLog      2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2021-10-15  Tyler Wilcock  <tyler_w@apple.com>
+
+        AX: Return AXEmptyGroup subrole for groups with no accessible content
+        https://bugs.webkit.org/show_bug.cgi?id=231528
+
+        Reviewed by Andres Gonzalez.
+
+        Return a subrole of "AXEmptyGroup" for groups without any exposed
+        children. WebKit can calculate this more efficiently than AX clients,
+        so it makes more sense to do here.
+
+        Test: accessibility/mac/empty-group-computation.html
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper subrole]):
+
</ins><span class="cx"> 2021-10-15  Alan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [LFC][IFC] Do not break the word-wrap: break-word content on inline box boundary
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (284243 => 284244)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm       2021-10-15 14:01:05 UTC (rev 284243)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm  2021-10-15 14:32:36 UTC (rev 284244)
</span><span class="lines">@@ -1834,6 +1834,10 @@
</span><span class="cx">     if (backingObject->isMeter())
</span><span class="cx">         return @"AXMeter";
</span><span class="cx"> 
</span><ins>+    // Treat any group without exposed children as empty.
+    if ([[self role] isEqual:NSAccessibilityGroupRole] && !backingObject->children().size())
+        return @"AXEmptyGroup";
+
</ins><span class="cx">     AccessibilityRole role = backingObject->roleValue();
</span><span class="cx">     if (role == AccessibilityRole::HorizontalRule)
</span><span class="cx">         return NSAccessibilityContentSeparatorSubrole;
</span></span></pre>
</div>
</div>

</body>
</html>