Skip to content

LogOfflineActivityModal: focus task name field on open #782

Description

@gaidheal1

Summary

Clicking "Add offline activity" opens LogOfflineActivityModal (frontend/src/components/LogOfflineActivityModal/LogOfflineActivityModal.tsx), but focus doesn't land on the task name field when the modal opens.

Expected behavior

When the modal opens, focus should move to the task name input (the EntitySearchInput at frontend/src/components/LogOfflineActivityModal/LogOfflineActivityModal.tsx:73-81) so keyboard/screen-reader users can start typing immediately without needing to tab or click into it.

Notes

  • Likely fix: autofocus the underlying input on mount, either via a ref + useEffect in LogOfflineActivityModal/useLogOfflineActivityForm, or an autoFocus-style prop threaded through EntitySearchInput.
  • Check Modal (frontend/src/components/Modal/Modal.tsx) for any existing focus-management convention (e.g. focus trap / initial focus target) other modals already rely on, and follow that pattern for consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions