Skip to content

Commit b8c256e

Browse files
authored
Update the Web A11Y DOM without rebuilding unchanged nodes (#3349)
This PR is a pre-requisite for fixing scroll - https://youtrack.jetbrains.com/issue/CMP-8627/Web-A11y.-Voice-over.-Scroll-doesnt-work Previously we had this on every sync: ``` // To ensure the correct order of nested nodes, we remove all of them. // I assume it's more efficient to remove and re-add them than to insert the nodes at specific positions. // Also, the code is more simple with this approach. // They are added back when they are synced. removeAllChildrenOf(htmlNode) ``` Now: By avoiding the unnecessary structural changes in the A11Y tree we ensure the VO/AT do not loose the focused/active UI element. Otherwise, on every sync it falls back to activating the nearest "stable" group element (container) and the AT user has to navigate to the previous location again. ## Testing - Added new tests checking the mutations in the A11Y tree ## Release Notes N/A
1 parent dca97b2 commit b8c256e

3 files changed

Lines changed: 465 additions & 85 deletions

File tree

0 commit comments

Comments
 (0)