Skip to content

feat(AmountConfirm): add aria-live region for screen-reader announcements (Closes #839) - #902

Closed
waterWang wants to merge 1 commit into
Creditra:mainfrom
waterWang:feat/amountconfirm-aria-live-839
Closed

waterWang wants to merge 1 commit into
Creditra:mainfrom
waterWang:feat/amountconfirm-aria-live-839

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Adds a polite aria-live region (via the project's existing LiveRegion component) to AmountConfirm so screen-reader users are notified of status changes.

Changes

  • src/pages/AmountConfirm.tsx: Imported LiveRegion component and added srAnnouncement state. On successful confirmation, announces "Amount confirmed: $"; on mismatch, announces the expected amount.
  • src/pages/AmountConfirm.test.tsx: Added 3 tests:
    • Verifies LiveRegion renders with sr-only class and aria-live="polite"
    • Verifies confirmation announcement on match
    • Verifies error announcement on mismatch

Acceptance Criteria

  • LiveRegion with sr-only class is rendered inside the form
  • aria-live="polite" ensures SR announcements don't interrupt the user
  • Confirmation success announces the confirmed amount
  • Error state announces the mismatch and expected amount
  • All 10 tests pass (7 existing + 3 new)

Closes #839

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.

Add aria-live region for AmountConfirm status updates [b#026]

2 participants