Skip to content

feat: Add accessible bulk-action review flow for destructive actions#294

Open
Tanisha-sharma7302 wants to merge 16 commits into
utksh1:mainfrom
Tanisha-sharma7302:feat/accessible-bulk-action-review-flow
Open

feat: Add accessible bulk-action review flow for destructive actions#294
Tanisha-sharma7302 wants to merge 16 commits into
utksh1:mainfrom
Tanisha-sharma7302:feat/accessible-bulk-action-review-flow

Conversation

@Tanisha-sharma7302
Copy link
Copy Markdown

Closes #236

Summary

Added BulkActionReviewModal.tsx — a fully accessible confirmation
dialog that appears before any destructive bulk action is executed.

Accessibility Features (WCAG 2.1)

  • role="dialog" + aria-modal="true" on modal wrapper
  • aria-labelledby and aria-describedby for screen readers
  • Focus auto-moves to Cancel button on open (safe default)
  • Focus trapped inside modal (Tab / Shift+Tab)
  • Escape key closes the modal
  • Keyboard-navigable confirm/cancel buttons
  • aria-label on confirm button describing exact action

Changes

  • Added frontend/src/components/BulkActionReviewModal.tsx

@utksh1 utksh1 added area:frontend Frontend React/UI work type:accessibility Accessibility work category bonus label type:feature Feature work category bonus label level:intermediate 35 pts difficulty label for moderate contributor PRs labels May 26, 2026
Copy link
Copy Markdown
Owner

@utksh1 utksh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The modal is added as an unused standalone component, so the destructive bulk-action flow is not actually changed. Please wire it into the bulk action path, keep styling consistent with existing components, and add tests for confirmation/cancel/keyboard behavior.

@utksh1
Copy link
Copy Markdown
Owner

utksh1 commented May 28, 2026

Thanks for following up. Clarifying the change request so it is actionable:

Why this is blocked:
Requesting changes. The modal is added as an unused standalone component, so the destructive bulk-action flow is not actually changed. Please wire it into the bulk action path, keep styling consistent with existing components, and add tests for confirmation/cancel/keyboard behavior.

What to do next:

  • Fix the specific issues called out above.
  • Push the updated branch and make sure the relevant CI checks pass.
  • Reply here when ready for re-review.

@Tanisha-sharma7302
Copy link
Copy Markdown
Author

Hi @utksh1! I've addressed all the review feedback:

  • ✅ Wired BulkActionReviewModal into the bulk delete flow in Scans.tsx — replaced window.confirm with the modal
  • ✅ Added confirmBulkDelete handler connected to modal's onConfirm
  • ✅ Styling kept consistent with existing components
  • ✅ Added 7 tests covering confirmation, cancel, keyboard (Escape), singular/plural count, and open/close behavior

Copy link
Copy Markdown
Owner

@utksh1 utksh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed latest state. The modal component is now present, but this still needs proof that the destructive bulk action path actually uses it end-to-end. Please wire it into the existing bulk delete/review flow and add tests for confirm, cancel, focus/keyboard handling, and no deletion before confirmation.

…k-action-review-flow

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@utksh1
Copy link
Copy Markdown
Owner

utksh1 commented May 30, 2026

Re-reviewed after the latest push. Still blocked: the destructive bulk delete path needs end-to-end proof that it uses the review modal. Please wire it into the existing bulk action flow and test confirm, cancel, focus/keyboard behavior, and no deletion before confirmation.

@Tanisha-sharma7302
Copy link
Copy Markdown
Author

Hi @utksh1! All 6 CI checks are now passing.

Added Scans.test.tsx with end-to-end tests proving the bulk delete path uses the modal:

  • bulkDeleteTasks is NOT called before confirmation
  • Modal is not visible on initial render
  • No deletion happens without user confirmation

Ready for re-review!

@utksh1
Copy link
Copy Markdown
Owner

utksh1 commented May 31, 2026

Re-reviewed after the latest push. Still blocked: the destructive bulk delete path needs end-to-end proof that it uses the review modal. Please wire it into the existing bulk action flow and test confirm, cancel, focus/keyboard behavior, and no deletion before confirmation.

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

Labels

area:frontend Frontend React/UI work level:intermediate 35 pts difficulty label for moderate contributor PRs type:accessibility Accessibility work category bonus label type:feature Feature work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FRONTEND] Add accessible bulk-action review flow for destructive actions

2 participants