## Description Implement modal plugin with full accessibility support (focus trap, ARIA, keyboard handling) for high-attention experiences like exit intent. ## Tasks - [ ] Create `packages/plugins/src/modal/` directory structure - [ ] Define TypeScript types (`types.ts`) - [ ] Implement core modal plugin (`modal.ts`) - [ ] Overlay/backdrop rendering - [ ] Dialog content rendering - [ ] Focus trap implementation - [ ] Keyboard event handlers (Escape, Tab) - [ ] ARIA attribute management - [ ] Add default CSS styles - [ ] Export from `packages/plugins/src/index.ts` - [ ] Auto-register in `packages/core/src/runtime.ts` ## Acceptance Criteria - [ ] Modal renders with overlay backdrop - [ ] Focus trap works (Tab cycles within modal) - [ ] Escape key closes modal - [ ] Backdrop click closes modal (configurable) - [ ] ARIA attributes present (role="dialog", aria-modal="true") - [ ] First focusable element receives focus on open - [ ] Focus returns to trigger element on close - [ ] Mobile responsive - [ ] Body scroll prevented when modal open - [ ] Multiple modals supported - [ ] Emits standard events (shown, action, dismissed) **Estimate:** 2 days
Description
Implement modal plugin with full accessibility support (focus trap, ARIA, keyboard handling) for high-attention experiences like exit intent.
Tasks
packages/plugins/src/modal/directory structuretypes.ts)modal.ts)packages/plugins/src/index.tspackages/core/src/runtime.tsAcceptance Criteria
Estimate: 2 days