[webkit-changes] [WebKit/WebKit] 179399: AX: AccessibilityNodeObject::textUnderElement fail...
Tyler Wilcock
noreply at github.com
Fri Dec 29 12:10:10 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 179399e470ccfe2cec9a4362b0dbc585e403e111
https://github.com/WebKit/WebKit/commit/179399e470ccfe2cec9a4362b0dbc585e403e111
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-12-29 (Fri, 29 Dec 2023)
Changed paths:
A LayoutTests/accessibility/display-flex-shadow-dom-accname-expected.txt
A LayoutTests/accessibility/display-flex-shadow-dom-accname.html
A LayoutTests/accessibility/nested-custom-element-accname-expected.txt
A LayoutTests/accessibility/nested-custom-element-accname.html
A LayoutTests/accessibility/slot-default-contents-accname-expected.txt
A LayoutTests/accessibility/slot-default-contents-accname.html
A LayoutTests/platform/glib/accessibility/display-flex-shadow-dom-accname-expected.txt
A LayoutTests/platform/glib/accessibility/nested-custom-element-accname-expected.txt
A LayoutTests/platform/glib/accessibility/slot-default-contents-accname-expected.txt
M LayoutTests/platform/ios/TestExpectations
A LayoutTests/platform/ios/accessibility/display-flex-shadow-dom-accname-expected.txt
A LayoutTests/platform/ios/accessibility/nested-custom-element-accname-expected.txt
A LayoutTests/platform/ios/accessibility/slot-default-contents-accname-expected.txt
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Log Message:
-----------
AX: AccessibilityNodeObject::textUnderElement fails to retrieve text in many types of common shadow DOM scenarios
https://bugs.webkit.org/show_bug.cgi?id=266916
rdar://problem/120223342
Reviewed by Chris Fleizach.
This is a Safari 17 regression from https://bugs.webkit.org/show_bug.cgi?id=261376. We attempted a fix in
https://bugs.webkit.org/show_bug.cgi?id=264410, but that missed many scenarios.
With this patch, we exclude shadow DOM nodes entirely from the skip-text-under-element-check added in 261376.
In rare scenarios, this may cause duplicate text to be exposed when mixing certain display types within the shadow DOM,
but that is far better than the status quo, which is that we fail to expose any accessibility text for tons of
shadow DOM components. We can address this in a later patch.
Fixes these three bugs (testcases added for all):
https://bugs.webkit.org/show_bug.cgi?id=266804
https://bugs.webkit.org/show_bug.cgi?id=266789
https://bugs.webkit.org/show_bug.cgi?id=266717
* LayoutTests/accessibility/display-flex-shadow-dom-accname-expected.txt: Added.
* LayoutTests/accessibility/display-flex-shadow-dom-accname.html: Added.
* LayoutTests/accessibility/nested-custom-element-accname-expected.txt: Added.
* LayoutTests/accessibility/nested-custom-element-accname.html: Added.
* LayoutTests/accessibility/slot-default-contents-accname-expected.txt: Added.
* LayoutTests/accessibility/slot-default-contents-accname.html: Added.
* LayoutTests/platform/glib/accessibility/display-flex-shadow-dom-accname-expected.txt: Added.
* LayoutTests/platform/glib/accessibility/nested-custom-element-accname-expected.txt: Added.
* LayoutTests/platform/glib/accessibility/slot-default-contents-accname-expected.txt: Added.
* LayoutTests/platform/ios/TestExpectations: Enable new tests.
* LayoutTests/platform/ios/accessibility/display-flex-shadow-dom-accname-expected.txt: Added.
* LayoutTests/platform/ios/accessibility/nested-custom-element-accname-expected.txt: Added.
* LayoutTests/platform/ios/accessibility/slot-default-contents-accname-expected.txt: Added.
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement const):
Canonical link: https://commits.webkit.org/272531@main
More information about the webkit-changes
mailing list