# A11y Focus Manager

Confirmation dialog that returns focus to the button that opened it.

- id: `a11y-focus-manager`
- Page: https://agentic-ui-kit.com/components/a11y-focus-manager
- Live preview: https://agentic-ui-kit.com/live/component/a11y-focus-manager

## Install

```bash
agentic-ui add a11y-focus-manager
npx shadcn@4.17.0 add @agentic-ui/a11y-focus-manager
```

## Metadata

- **Level:** block
- **Category:** block
- **Installable in:** Radix UI (registry variant new-york), Base UI (registry variant base-vega)
- **Capabilities:** focus-trap, focus-restore, initial-focus-resolution, tab-cycle-loop, nested-scope-stack, escape-dismissal, tabbable-resolution, empty-scope-containment, step-flow-focus-handoff, live-region-step-announcement, non-modal-scope, programmatic-focus-recovery
- **Intents:** execute-flow, navigate, configure
- **Suits domains:** saas, operations, billing, auth, settings, healthcare
- **Interaction:** keyboard-tab-cycle, escape-dismissal, programmatic-focus, step-navigation
- **Screen role:** flow
- **Density:** medium
- **Dark mode:** yes
- **Use it for:** confirmation dialog that returns focus to the button that opened it, multi-step onboarding wizard that moves focus to each step's heading, filters drawer that contains focus without declaring itself modal, nested delete dialog over an edit dialog, where only the inner one responds to Escape
- **Avoid when:** always-visible content that must not capture focus from the rest of the page, menus and listboxes from a primitive that already manages its own focus, full route transitions, where focus is managed by the router and not a local scope
- **Preserve when adapting:** focus-containment, focus-restoration, nested-scope-precedence, step-announcement
- **Replace when adapting:** surface-styling, dialog-copy, step-definitions, announcement-language
- **Adaptation effort:** low
- **Coupling:** low
- **Quality score:** 9.05/10
- **Quality breakdown:** visual 8/10, responsive 9/10, accessibility 10/10, code 9/10
