[Frontend] Accessibility (a11y) & WCAG 2.1 AA Compliance Audit (#1198) - #1407
Closed
dimka90 wants to merge 1 commit into
Closed
[Frontend] Accessibility (a11y) & WCAG 2.1 AA Compliance Audit (#1198)#1407dimka90 wants to merge 1 commit into
dimka90 wants to merge 1 commit into
Conversation
…ypt#1198) - Add LiveValue throttled aria-live region for ticking balances (IncomingStreamCard claimable, stream-details StatCard claimable) so screen readers announce on user query rather than per frame. - Respect prefers-reduced-motion in useStreamingAmount: compute accrued value once instead of running the rAF loop. - Global :focus-visible outline token for keyboard users (2.4.7). - Fix dark-mode contrast for ticker labels, badges, and modal copy (slate/emerald/amber/indigo utilities get dark: variants). - give the clipboard icon button in StreamDetailsModal an accessible name. - Replace invalid dl/dt/dd layout in IncomingStreamCard with div-based structure to satisfy axe definition-list/dlitem rules. - Add axe-core a11y suite (a11y.test.tsx) asserting zero critical/serious violations across IncomingStreamCard, StreamDetailsModal, TopUpModal, WalletModal; unit tests for LiveValue throttling.
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 #1198 — proactive accessibility audit & remediation for FlowFi's dashboard surfaces.
What changed
Live ticing announcements — new
LiveValuecomponent (components/ui/LiveValue.tsx): a visually-hiddenaria-live="polite"+aria-atomic="true"region that syncs from the latest rendered value at most once per cadence (default 1s), wired into:IncomingStreamCardclaimable amountStatCardclaimable metric (thelivecard)Screen readers now announce balances on user query instead of per-
requestAnimationFrame.prefers-reduced-motion —
useStreamingAmountcomputes the accrued value once when(prefers-reduced-motion: reduce)is set instead of running the animation loop.Keyboard focus — global
:focus-visibleoutline (accent) for all interactive elements (WCAG 2.4.7).Contrast (dark mode) — added
dark:variants for ticker labels, status badges (emerald/amber/slate), and modal copy; solidtext-sky-800replaces the failingtext-sky-800/70.Dialog semantics fixes:
StreamDetailsModalicon copy button now hasaria-label="Copy recipient address"IncomingStreamCardswapped an invaliddl/dt/ddlayout (div-wrapped) for div-based structure to satisfy axedefinition-list/dlitemAutomated testing —
__tests__/a11y.test.tsxruns axe-core againstIncomingStreamCard,StreamDetailsModal,TopUpModal, andWalletModal, asserting zero critical/serious violations (color-contrastexcluded: happy-dom can't compute real styles — covered by the browser-side audit + token fixes).__tests__/live-value.test.tsxcovers throttling behavior.Verification
npx vitest run: 321 tests pass (37 files)npx tsc --noEmit: 0 net-new errors vs. main baselinenpm run lint --workspace=frontend: clean