Skip to content

Fix focus management when opening the About modal #411

@coderabbitai

Description

@coderabbitai

Summary

When the About modal is opened via the menu, focus management has two related problems:

  1. previouslyFocused captures #about-menu-item, which is inside the menu that becomes hidden immediately after — so returning focus on close may target a hidden element.
  2. closeInfoModal.focus() targets a <span>, which is non-interactive by default, meaning keyboard focus may land outside the dialog. This means the Tab trap and Escape handler do not reliably engage for keyboard users.

Impact

Keyboard and assistive-technology users may lose focus context when opening or closing the About modal.

References

Requested by @lawsie.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions