Skip to content

[Performance] Restore tracked aria-hidden values on modalizer disposal - #610

Open
andreivms wants to merge 1 commit into
microsoft:masterfrom
andreivms:user/andreivms/perf-tabster-modal-cleanup-local
Open

andreivms wants to merge 1 commit into
microsoft:masterfrom
andreivms:user/andreivms/perf-tabster-modal-cleanup-local

Conversation

@andreivms

@andreivms andreivms commented Nov 5, 2026 •

Copy link
Copy Markdown

Summary

Restore live tracked aria-hidden augmentations through the existing attribute helper before Modalizer disposal discards their storage. Otherwise, cancelling the pending hidden-update timer can leave outside content hidden after the last counted wrapper is removed.

Fixes #530.

The [Performance] title follows the contribution's investigation category; this is a functional cleanup fix, not a measured CPU improvement.

Evidence chain

Public modalizer hidden-update/disposal lifecycle context
-> source shows original attribute tracking discarded after cancelling the timer
-> real React last-wrapper removal leaves outside actions hidden
-> restore live tracked values through the existing helper before clearing storage

Implicated stacks during unresponsive renderer

Public ModalizerAPI.dispose and hidden-update traversal identify lifecycle context only. They do not prove live augmentation, assistive-technology incidence or renderer-CPU severity.

Baseline result

  • Four absent/false-original last-wrapper scenarios no longer leave the outside actions aria-hidden and absent from the accessibility tree.
  • Six retained-wrapper/deactivation controls retain their previous behavior.
  • Two originally true-hidden controls intentionally remain hidden.
  • Counted/shared and borrowed-core lifetime cases, detached live nodes and original attribute ownership are preserved.

Scope and limits

  • Regression coverage includes shared/borrowed counted lifetimes, original absent/false/true values, detached live nodes and normal deactivation.
  • Existing tracked weak references and the existing augmentation/restoration helper are reused; no traversal or lifetime cache is introduced.
  • Actual screen-reader speech, permanent keyboard lock and production timing are not claimed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 37912007-07c2-40e4-81bd-df708aa99fe2

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ModalizerAPI.dispose clears _hiddenUpdateTimer without flushing — leaks aria-hidden on previously hidden elements

1 participant