Repository navigation
feat(FocusTrap): create simple focus trap for modal & drawer. PLAT-928 - #1335
Conversation
🚀 Snapshot Build PublishedA snapshot version has been published for testing: Snapshot Version: You can install this version in your project using: yarn add @securityscorecard/design-system@pr-1335This version will be automatically unpublished when the PR is closed or merged. |
🚀 Snapshot Build PublishedA snapshot version has been published for testing: Snapshot Version: You can install this version in your project using: yarn add @securityscorecard/design-system@pr-1335This version will be automatically unpublished when the PR is closed or merged. |
🚀 Snapshot Build PublishedA snapshot version has been published for testing: Snapshot Version: You can install this version in your project using: yarn add @securityscorecard/design-system@pr-1335This version will be automatically unpublished when the PR is closed or merged. |
🚀 Snapshot Build PublishedA snapshot version has been published for testing: Snapshot Version: You can install this version in your project using: yarn add @securityscorecard/design-system@pr-1335This version will be automatically unpublished when the PR is closed or merged. |
🚀 Snapshot Build PublishedA snapshot version has been published for testing: Snapshot Version: You can install this version in your project using: yarn add @securityscorecard/design-system@pr-1335This version will be automatically unpublished when the PR is closed or merged. |
🚀 Snapshot Build PublishedA snapshot version has been published for testing: Snapshot Version: You can install this version in your project using: yarn add @securityscorecard/design-system@pr-1335This version will be automatically unpublished when the PR is closed or merged. |
- Remove external focus-trap library dependency - Add custom useFocusTrap hook with keyboard navigation support - Add FocusTrap component for modal and drawer components - Update Modal and Drawer components to use new focus trap implementation - Add comprehensive tests and Storybook stories - Fix accessibility issues and visual regressions - Update DropdownMenu to work with new focus trap - Add visual regression test snapshots PLAT-928
2dc6ec1 to
e63d3ae
Compare
🚀 Snapshot Build PublishedA snapshot version has been published for testing: Snapshot Version: You can install this version in your project using: yarn add @securityscorecard/design-system@pr-1335This version will be automatically unpublished when the PR is closed or merged. |
|
🎉 This issue has been resolved in version 2.35.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Video:
FocusTrap.mp4
What This Does
Implements proper focus management for Modal and Drawer components to improve accessibility and user experience. When these components are open, keyboard navigation (Tab/Shift+Tab) is now constrained within the component, preventing users from accidentally tabbing to elements behind the overlay.
Why This Matters
Key Improvements
Component Changes
Modal Component
FocusTrapcomponentDrawer Component
FocusTrapfor both backdrop and non-backdrop variantsDropdownMenu Component
Impact
Testing
Breaking Changes
None - this is purely additive functionality that enhances existing components without changing their APIs.