AccessibilityNodeObject is missing a few key method implementations that can cause incorrect AX tree construction (either missing or stale content) after dynamic page updates. These methods are: - updateChildrenIfNecessary - setNeedsToUpdateChildren - needsToUpdateChildren - setNeedsToUpdateSubtree
<rdar://problem/99956378>
Created attachment 462352 [details] Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 462352 [details] > Patch Good catch! --- a/LayoutTests/accessibility/display-contents-dynamically-added-children.html +++ a/LayoutTests/accessibility/display-contents-dynamically-added-children.html + function traversePage() { ... + let textContent = accessibilityController.platformName === "ios" ? searchResult.description : searchResult.stringValue; + testOutput += `\n${textContent}`; This could be a single line. + } + testOutput += "\n"; + } + } Don't really need this second \n. You also have function dumpAccessibilityTree(accessibilityObject, stopElement, indent, allAttributesIfNeeded, getValueFromTitle, includeSubrole) in accessibility-helper.js that would also do the trick.
Shouldn't the bug title reflect that this is a display:contents problem?
(In reply to Andres Gonzalez from comment #4) > Shouldn't the bug title reflect that this is a display:contents problem? This isn't specific to display:contents. Any AccessibilityNodeObject is affected. Also, I acknowledge and agree with your suggestions regarding the test. I would prefer not to wait 12 hours for another round of EWS, so I can try to cover those changes in a later patch.
Committed 254534@main (c6e7fc8ecc94): <https://commits.webkit.org/254534@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 462352 [details].