Skip to content

a11y(dialogs): full keyboard operability#780

Merged
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
unajiogenyi05-hub:a11y/dialogs-11-keyboard
Jul 26, 2026
Merged

a11y(dialogs): full keyboard operability#780
mikewheeleer merged 1 commit into
Talenttrust:mainfrom
unajiogenyi05-hub:a11y/dialogs-11-keyboard

Conversation

@unajiogenyi05-hub

Copy link
Copy Markdown
Contributor
  • Fix ConfirmDialog cancel button: add focus-visible ring (was unstyled)
  • Fix ConfirmDialog confirm button: tone-aware ring (blue default / red destructive) replacing the broken primary-600 token
  • Enable restoreFocus in useDialogFocusTrap so trigger regains focus after dialog closes (WCAG 2.1 SC 3.2.2)
  • Add ConfirmDialogKeyboard.test.tsx with 21 tests covering: tab order, wrap forward/backward, Enter/Space activation, Escape from any position, focus restoration, focus-visible classes, and destructive tone keyboard flow

Description

Closes #

Type of Change

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no functional change, internal code improvement)
  • Documentation update

Pre-flight Checklist

All items must be checked before requesting review.

  • npm run lint passes with no errors
  • npm test passes with no failures
  • npm run build completes successfully

Testing & Coverage

  • Module test coverage for impacted files meets or exceeds the 95% minimum threshold
    (run npm test -- --coverage and check the per-file table)
  • If this PR adds or modifies UI components, accessibility tests were written using
    the shared utilities in src/test-utils/a11y.tsx

What was tested?


Accessibility & Security Notes

Accessibility

Security

closes #638

- Fix ConfirmDialog cancel button: add focus-visible ring (was unstyled)
- Fix ConfirmDialog confirm button: tone-aware ring (blue default / red
  destructive) replacing the broken primary-600 token
- Enable restoreFocus in useDialogFocusTrap so trigger regains focus
  after dialog closes (WCAG 2.1 SC 3.2.2)
- Add ConfirmDialogKeyboard.test.tsx with 21 tests covering:
  tab order, wrap forward/backward, Enter/Space activation,
  Escape from any position, focus restoration, focus-visible
  classes, and destructive tone keyboard flow
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@unajiogenyi05-hub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mikewheeleer
mikewheeleer merged commit 650e4a7 into Talenttrust:main Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the dialogs controls fully keyboard-operable

2 participants