Repository navigation
Conversation
…ficationDropdown Fixes LabsCrypt#1636
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enhances
NotificationDropdown(frontend/src/components/NotificationDropdown.tsx) witharia-controlslinking the bell trigger button to the dropdown menu container (id="notifications-dropdown-menu"), accuratearia-expandedstate exposure,aria-live="polite"unread announcement, and keyboard focus management that returns focus to the bell trigger button when dismissed via theEscapekey or close button.Type of Change
Related Issues
Closes #1636
Fixes #1636
/claim #1636
Changes Made
triggerRef(useRef<HTMLButtonElement>(null)) andaria-controls="notifications-dropdown-menu"to the notification bell trigger button infrontend/src/components/NotificationDropdown.tsx.id="notifications-dropdown-menu"to the notification dropdown dialog container.triggerRef.currentwhenEscapeis pressed while the dropdown is open (or when the close button is activated).frontend/src/components/NotificationDropdown.test.tsxverifyingaria-expanded,aria-controls,aria-liveannouncement updates, andEscapekey dismissal restoring focus to the bell trigger button.Testing
Test Coverage
Test Steps
npx vitest run src/components/NotificationDropdown.test.tsxinfrontend/(7/7 tests pass).npx tsc --noEmitinfrontend/(0 errors).npx eslint src/components/NotificationDropdown.tsx src/components/NotificationDropdown.test.tsxinfrontend/(0 errors, 0 warnings).Checklist
Additional Notes
Payout Details
0x9a51790aC01c54184bcFa067bC38f7F0E7C6F6B6