Reuse the same native wrapper in the accessibility tree when a node in the DOM tree gets reparented
If a node in the accessibility tree moves from one location to another but otherwise does not change its role, we say that the node has been reparented. This could happen, e.g. when a subtree in the DOM is moved using script from one location of the page to another, or using aria-owns to change the structure of the AX tree. Until a few months ago, we used to re-initialize the node in the accessibility tree when it got reparented. It turns out that this operation assigned the new node to the wrapper, hence, effectively, the same native wrapper was being reused. However, after https:://crrev.com/c/3194077 we stopped reusing the same native wrapper, opting to create a new one instead, in the mistaken belief that the previous re-initialization was re-creating a new node. The fix is to set the node that is being wrapped to the new value on every reparent operation. R=aleventhal@chromium.org AX-Relnotes: Search field on New Tab Page reads text when deleting by word. Fixed: 1289887 Tested: Using NVDA on the New Tab Page. Change-Id: I2692dbd53807c52afe9da9ea5eb363fe695f4582 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3468769 Reviewed-by:Aaron Leventhal <aleventhal@chromium.org> Commit-Queue: Nektarios Paisios <nektar@chromium.org> Auto-Submit: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/main@{#975731}
Loading
Please register or sign in to comment