Skip to content

Focus-trap nested confirm dialogs #920

Closed

Description

@currentbits

Settings, onboarding, KeyboardSheet, WorkflowsModal, AddProjectPathModal, and EditProjectModal now use useModalFocus from src/useModalFocus.ts (same pattern as ProviderQuotaDialog). Nested confirm dialogs still declare role=dialog aria-modal=true without the hook: Sidebar remove-project confirm (src/components/Sidebar.tsx around data-remove-confirm) and AgentsPanel restore-checkpoint confirm (src/components/AgentsPanel.tsx around data-restore-confirm). ThreadView also has a few role=dialog overlays. Wire useModalFocus the same way: dialog ref, tabIndex=-1, initial focus, Tab cycle, restore on close. Add a mounted test that opening the confirm moves document.activeElement inside it and Tab stays inside. Do not change the confirm copy or the delete/restore logic.

Filed from a Solenta suggested-work chip.

Activity

  1. added
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Sep 5, 2026
  2. added
    plan:done
    and removed
    plan:doing
    on Oct 9, 2026
  3. currentbits commented on Oct 9, 2026

    @currentbits
    OwnerAuthor

    Done: useModalFocus is wired into the nested confirm dialogs (Sidebar remove-project, AgentsPanel restore, ThreadView dialogs). Closing in the 2026-10-09 board cleanup (#1532).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions