Skip to content

feat(ui): add Escape and Enter keyboard shortcuts to modals - #491

Merged
eshaanag merged 1 commit into
eshaanag:mainfrom
Chigael:feat/modal-keyboard-shortcuts
Sep 1, 2026
Merged

feat(ui): add Escape and Enter keyboard shortcuts to modals#491
eshaanag merged 1 commit into
eshaanag:mainfrom
Chigael:feat/modal-keyboard-shortcuts

Conversation

@Chigael

@Chigael Chigael commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Program

  • ECSoC 2026
  • ELUSOC 2026
  • Regular contribution (not part of a program)

What does this PR do?

It adds adding keydown listeners to modal components for improved accessibility.
Key Changes

  • frontend/src/components/ConfirmDeleteRepoModal.tsx:
    • Escape: Closes the modal.
    • Enter: Triggers the confirmation/deletion action (handleConfirm).
    • Added safeguards to ignore keyboard shortcuts while deletion is in progress (deleting === true).

Related issue

Closes #311

Checklist

  • I have added the correct program label (ECSoC26 or ELUSOC) to this PR
  • I tested this change locally
  • This PR addresses exactly one issue/feature (not a bundle of unrelated changes)
  • I did not open this PR purely to farm contribution counts

@Chigael
Chigael requested a review from eshaanag as a code owner August 31, 2026 13:52
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Chigael is attempting to deploy a commit to the Eshaan's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the frontend Frontend changes label Aug 31, 2026
@eshaanag eshaanag added ECSoC26 Required tag — marks PR as counted for ECSoC 2026 scoring ECSoC26-L1 Easy — 5 pts (auto-applied by Sentinel) good-pr Bonus XP: exceptional PR (+15 XP) good-ui Bonus XP: notable UI contribution (+25 XP) labels Sep 1, 2026
@eshaanag
eshaanag merged commit 79e463b into eshaanag:main Sep 1, 2026
12 of 16 checks passed
@ecsoc-sentinel ecsoc-sentinel Bot added ECSoC26-L1 Easy — 5 pts (auto-applied by Sentinel) and removed ECSoC26-L1 Easy — 5 pts (auto-applied by Sentinel) labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECSoC26-L1 Easy — 5 pts (auto-applied by Sentinel) ECSoC26 Required tag — marks PR as counted for ECSoC 2026 scoring frontend Frontend changes good-pr Bonus XP: exceptional PR (+15 XP) good-ui Bonus XP: notable UI contribution (+25 XP)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Support keyboard shortcuts (Escape to close, Enter to submit) on modals

2 participants