Diff
Modified: trunk/LayoutTests/ChangeLog (284298 => 284299)
--- trunk/LayoutTests/ChangeLog 2021-10-16 00:44:06 UTC (rev 284298)
+++ trunk/LayoutTests/ChangeLog 2021-10-16 00:49:33 UTC (rev 284299)
@@ -1,3 +1,17 @@
+2021-10-15 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, reverting r284245.
+ https://bugs.webkit.org/show_bug.cgi?id=231848
+
+ Caused
+
+ Reverted changeset:
+
+ "AX: WebKit should not expose redundant AXGroups with missing
+ role when the label is the same as the contents"
+ https://bugs.webkit.org/show_bug.cgi?id=169924
+ https://commits.webkit.org/r284245
+
2021-10-15 Robert Jenner <jen...@apple.com>
REBASELINE: fast/text/capitalize-boundaries.html is a constant text failure
Deleted: trunk/LayoutTests/accessibility/mac/ignore-redundant-accessibility-text-groups-expected.txt (284298 => 284299)
--- trunk/LayoutTests/accessibility/mac/ignore-redundant-accessibility-text-groups-expected.txt 2021-10-16 00:44:06 UTC (rev 284298)
+++ trunk/LayoutTests/accessibility/mac/ignore-redundant-accessibility-text-groups-expected.txt 2021-10-16 00:49:33 UTC (rev 284299)
@@ -1,30 +0,0 @@
-This test ensures WebKit ignores groups with redundant accessibility text.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS !ariaLabelGroup is true
-PASS !titleGroup is true
-PASS !ariaLabelDiv is true
-PASS !titleDiv is true
-PASS typeof clickHandlerGroup is 'object'
-PASS typeof clickHandlerDiv is 'object'
-PASS resultElement.role is 'AXRole: AXStaticText'
-PASS resultElement.stringValue is 'AXValue: Blue cheese'
-PASS resultElement.role is 'AXRole: AXStaticText'
-PASS resultElement.stringValue is 'AXValue: Oranges'
-PASS contentContainer.childrenCount is 6
-PASS contentContainer.childAtIndex(0).stringValue is 'AXValue: Blue cheese'
-PASS contentContainer.childAtIndex(0).role is 'AXRole: AXStaticText'
-PASS contentContainer.childAtIndex(1).stringValue is 'AXValue: Oranges'
-PASS contentContainer.childAtIndex(1).role is 'AXRole: AXStaticText'
-PASS contentContainer.childAtIndex(2).role is 'AXRole: AXGroup'
-PASS contentContainer.childAtIndex(3).stringValue is 'AXValue: Jello'
-PASS contentContainer.childAtIndex(3).role is 'AXRole: AXStaticText'
-PASS contentContainer.childAtIndex(4).stringValue is 'AXValue: Broccoli'
-PASS contentContainer.childAtIndex(4).role is 'AXRole: AXStaticText'
-PASS contentContainer.childAtIndex(5).role is 'AXRole: AXGroup'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/accessibility/mac/ignore-redundant-accessibility-text-groups.html (284298 => 284299)
--- trunk/LayoutTests/accessibility/mac/ignore-redundant-accessibility-text-groups.html 2021-10-16 00:44:06 UTC (rev 284298)
+++ trunk/LayoutTests/accessibility/mac/ignore-redundant-accessibility-text-groups.html 2021-10-16 00:49:33 UTC (rev 284299)
@@ -1,94 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src=""
-<script src=""
-</head>
-<body>
-
-<div id="content" role="group">
- <!-- First, test role="group" elements. -->
- <div id="aria-label-group" role="group" aria-label="Blue cheese">
- Blue cheese
- </div>
-
- <div id="title-group" role="group" title="Oranges">
- Oranges
- </div>
-
- <div id="click-handler-group" role="group" aria-label="Group click handler" _onclick_="emptyClickHandler()">
- Group click handler
- </div>
-
- <!-- Also test role-less generic divs. -->
- <div id="aria-label-div" aria-label="Jello">
- Jello
- </div>
-
- <div id="title-div" title="Broccoli">
- Broccoli
- </div>
-
- <div id="click-handler-div" aria-label="Div click handler" _onclick_="emptyClickHandler()">
- Div click handler
- </div>
-</div>
-
-<script>
- description("This test ensures WebKit ignores groups with redundant accessibility text.");
- const emptyClickHandler = () => {};
-
- if (window.accessibilityController) {
-
- var contentContainer = accessibilityController.accessibleElementById("content");
-
- var ariaLabelGroup = accessibilityController.accessibleElementById("aria-label-group");
- var clickHandlerGroup = accessibilityController.accessibleElementById("click-handler-group");
- var titleGroup = accessibilityController.accessibleElementById("title-group");
-
- var ariaLabelDiv = accessibilityController.accessibleElementById("aria-label-div");
- var clickHandlerDiv = accessibilityController.accessibleElementById("click-handler-div");
- var titleDiv = accessibilityController.accessibleElementById("title-div");
-
- // We shouldn't be able to get an accessible element for these groups because they should be ignored.
- shouldBeTrue("!ariaLabelGroup");
- shouldBeTrue("!titleGroup");
- shouldBeTrue("!ariaLabelDiv");
- shouldBeTrue("!titleDiv");
- // But any group with an event handler should always be exposed.
- shouldBe("typeof clickHandlerGroup", "'object'");
- shouldBe("typeof clickHandlerDiv", "'object'");
-
- // Ensure we can search for the text within the ignored groups.
- var resultElement = contentContainer.uiElementForSearchPredicate(contentContainer, true, "AXAnyTypeSearchKey", "", false);
- shouldBe("resultElement.role", "'AXRole: AXStaticText'");
- shouldBe("resultElement.stringValue", "'AXValue: Blue cheese'");
-
- resultElement = contentContainer.uiElementForSearchPredicate(resultElement, true, "AXAnyTypeSearchKey", "", false);
- shouldBe("resultElement.role", "'AXRole: AXStaticText'");
- shouldBe("resultElement.stringValue", "'AXValue: Oranges'");
-
- // Ensure the only accessible content exposed via `children` is the text elements and event handler groups.
- shouldBe("contentContainer.childrenCount", "6");
- shouldBe("contentContainer.childAtIndex(0).stringValue", "'AXValue: Blue cheese'");
- shouldBe("contentContainer.childAtIndex(0).role", "'AXRole: AXStaticText'");
-
- shouldBe("contentContainer.childAtIndex(1).stringValue", "'AXValue: Oranges'");
- shouldBe("contentContainer.childAtIndex(1).role", "'AXRole: AXStaticText'");
-
- shouldBe("contentContainer.childAtIndex(2).role", "'AXRole: AXGroup'");
-
- shouldBe("contentContainer.childAtIndex(3).stringValue", "'AXValue: Jello'");
- shouldBe("contentContainer.childAtIndex(3).role", "'AXRole: AXStaticText'");
-
- shouldBe("contentContainer.childAtIndex(4).stringValue", "'AXValue: Broccoli'");
- shouldBe("contentContainer.childAtIndex(4).role", "'AXRole: AXStaticText'");
-
- shouldBe("contentContainer.childAtIndex(5).role", "'AXRole: AXGroup'");
-
- document.getElementById("content").style.visibility = "hidden";
- }
-</script>
-</body>
-</html>
-
Modified: trunk/Source/WebCore/ChangeLog (284298 => 284299)
--- trunk/Source/WebCore/ChangeLog 2021-10-16 00:44:06 UTC (rev 284298)
+++ trunk/Source/WebCore/ChangeLog 2021-10-16 00:49:33 UTC (rev 284299)
@@ -1,3 +1,17 @@
+2021-10-15 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, reverting r284245.
+ https://bugs.webkit.org/show_bug.cgi?id=231848
+
+ Caused
+
+ Reverted changeset:
+
+ "AX: WebKit should not expose redundant AXGroups with missing
+ role when the label is the same as the contents"
+ https://bugs.webkit.org/show_bug.cgi?id=169924
+ https://commits.webkit.org/r284245
+
2021-10-15 Ross Kirsling <ross.kirsl...@sony.com>
Realize Mac CMake build of WebCore and WebKit
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (284298 => 284299)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2021-10-16 00:44:06 UTC (rev 284298)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2021-10-16 00:49:33 UTC (rev 284299)
@@ -680,14 +680,12 @@
if (Frame* frame = nodeDocument->frame()) {
// catch stale WebCoreAXObject (see <rdar://problem/3960196>)
if (frame->document() != nodeDocument)
- return { };
+ return String();
- // Renderers referenced by accessibility objects could get destroyed if TextIterator ends up triggering
- // a style update or layout here. See also AXObjectCache::deferTextChangedIfNeeded().
- if (nodeDocument->childNeedsStyleRecalc())
- return { };
+ // Renders referenced by accessibility objects could get destroyed, if TextIterator ends up triggering
+ // style update/layout here. See also AXObjectCache::deferTextChangedIfNeeded().
+ ASSERT_WITH_SECURITY_IMPLICATION(!nodeDocument->childNeedsStyleRecalc());
ASSERT_WITH_SECURITY_IMPLICATION(!nodeDocument->view()->layoutContext().isInRenderTreeLayout());
-
return plainText(*textRange, textIteratorBehaviorForTextRange());
}
}
Modified: trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm (284298 => 284299)
--- trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm 2021-10-16 00:44:06 UTC (rev 284298)
+++ trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm 2021-10-16 00:49:33 UTC (rev 284299)
@@ -114,28 +114,6 @@
return true;
}
-static bool shouldIgnoreGroup(const AccessibilityObject& axObject)
-{
- if (!axObject.isGroup() && axObject.roleValue() != AccessibilityRole::Div)
- return false;
-
- // Never ignore a <div> with event listeners attached to it (e.g. onclick).
- if (axObject.node() && axObject.node()->hasEventListeners())
- return false;
-
- auto* first = axObject.firstChild();
- if (first && first == axObject.lastChild() && first->roleValue() == AccessibilityRole::StaticText) {
- Vector<AccessibilityText> axText;
- axObject.accessibilityText(axText);
- // Don't expose <div>s whose only child is text that has the same content as the <div>s accessibility text.
- // Instead, we should expose the text element directly.
- auto firstText = axText.size() ? axText[0].text : String();
- if (first->stringValue() == firstText)
- return true;
- }
- return false;
-}
-
AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
if (isMenuListPopup() || isMenuListOption())
@@ -164,9 +142,6 @@
}
}
- if (shouldIgnoreGroup(*this))
- return AccessibilityObjectInclusion::IgnoreObject;
-
return AccessibilityObjectInclusion::DefaultBehavior;
}