fix: confirmation dialog a11y (#408) + MeterStatusBadge (#409)#493
Merged
Dev-AdeTutu merged 2 commits intoJun 29, 2026
Conversation
…ev-AdeTutu#409) - CollaboratorTable: add Escape key listener and focus trap (Tab/Shift+Tab wrapping) to confirmation dialog via useEffect + dialogRef - MeterStatusBadge: rewrite as named export; derive 'expired' when expiresAt*1000 < Date.now(); aria-label='Meter status: <state>'; CSS classes badge--active/inactive/expired - globals.css: add .badge--active, .badge--inactive, .badge--expired rules - MeterCard: replace inline status span with <MeterStatusBadge> - Provider dashboard meter table: replace inline status span with <MeterStatusBadge> (named import) closes Dev-AdeTutu#408 closes Dev-AdeTutu#409
|
@boseshittu2323-design 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! 🚀 |
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.
Closes #408
Closes #409
Summary
This PR improves accessibility and consistency across the provider dashboard by enhancing the collaborator confirmation dialog with keyboard support and introducing a reusable
MeterStatusBadgecomponent for standardized meter status rendering.Related Issue
Closes #408
Closes #409
Type of Change
Changes Made
Added keyboard accessibility to the
CollaboratorTableconfirmation dialog:useEffectanddialogRefto keep keyboard navigation within the dialog.Refactored
MeterStatusBadgeinto a named export for consistent reuse.Added automatic status derivation:
expiresAt * 1000 < Date.now().Improved accessibility by adding:
aria-label="Meter status: <state>"Added dedicated status styling classes:
.badge--active.badge--inactive.badge--expiredUpdated
globals.csswith styles for all badge states.Replaced inline status badges in
MeterCardwith the reusable<MeterStatusBadge>component.Updated the provider dashboard meter table to use the shared
MeterStatusBadgecomponent via named import, ensuring consistent behavior and styling throughout the application.How to Test
Open the collaborator confirmation dialog.
Verify that:
Open a meter with an expiration date in the past and confirm it displays the Expired badge.
Verify active and inactive meters display the correct badge styling.
Inspect the rendered badge to confirm it includes the appropriate
aria-label.Confirm both the
MeterCardand provider dashboard table render identical status badges.Checklist
cargo build/npm run build)tsc --noEmit)cargo fmt) and lint-clean (cargo clippy -- -D warnings)mainbranch and is rebased on the latest upstreamScreenshots (if applicable)
N/A – changes are primarily accessibility, refactoring, and UI consistency improvements.