# Accessible Overlay Architecture: Focus Traps, Scrims, and ARIA 1.3 Patterns

> A deep dive into managing modal stacks, route-aware dialogs, and clean escape handling across touch and desktop.

[Canonical page](https://mifantwan.com/journal/accessible-overlays-and-focus-traps/)

Written by Mifan Twan Ardana · 2026-05-22

## Why Overlay Managers Fail

Most web apps suffer from conflicting scroll locks and lost keyboard focus when multiple modals trigger in sequence. Our unified overlay coordinator ensures that:
1. Focus is trapped inside the topmost active layer.
2. The ESC key dismisses only the current topmost dialog.
3. Upon closing, focus returns accurately to the originating trigger element.
