mirror of
https://github.com/mozilla-firefox/firefox
synced 2026-08-10 11:48:50 +00:00
PruneOrInsertSubtree removes and reschedules any XULLabelAccessible it walks over. That is correct for a label whose frame was just reconstructed, because the anonymous content backing its `value` attribute is rebuilt with it, but the function also applies it while recursing through an ancestor's subtree, where nothing tells us the label needs recreating. Such a label is removed from the tree and only reinserted in a later notification controller pass, so assistive technology sees a spurious hide and reorder and the label is briefly absent. Only apply the recreation to the node that was reported as inserted, not to descendants reached by the subtree walk. This is reachable whenever a popup finishes opening: RootAccessible handles popupshown by calling ContentInserted on the panel, whose subtree has already been built, and the walk reached every XUL label and description underneath it. Differential Revision: https://phabricator.services.mozilla.com/D315734