Skip to content

Modals: add focus auto-focus and focus trapping #141

@alexmdac

Description

@alexmdac

Modals (Directory Picker, Editor, Version Checker, Usage Detail, etc.) don't
manage focus:

  1. Opening a modal doesn't move focus into it.
  2. Tabbing can escape the modal to elements behind the overlay.

Per the WAI-ARIA dialog pattern,
modals should auto-focus the first interactive element on open and trap
Tab/Shift+Tab within the modal while it's visible.

focus-trap-react would handle
both concerns with minimal code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions