Skip to content

fix(a11y): name the error badge of a failed swap for VoiceOver - #1575

Draft
romchornyi-pitcrew wants to merge 1 commit into
dashpay:developfrom
romchornyi-pitcrew:fix/tx-badge-labels
Draft

romchornyi-pitcrew wants to merge 1 commit into
dashpay:developfrom
romchornyi-pitcrew:fix/tx-badge-labels

Conversation

@romchornyi-pitcrew

Copy link
Copy Markdown

Issue being fixed or feature implemented

Companion of dashpay/DashUIKit#91 (part of dashpay/DashUIKit#38). With that change, TransactionView hides its corner badge (secondaryIcon) from VoiceOver unless the host names it, instead of reading the asset's file name ("transaction-error").

Most badges in the transaction list repeat what the row already says: the direction (amount sign), the transfer route (details), the gift card (title), Coinbase (title and sign). Hidden is right for them. One badge is the only sign of its state: the error badge of a failed, refunded or expired swap, whose row has no status text. Without a label VoiceOver users would not learn that the swap failed.

Draft until the DashUIKit release that contains #91 is pinned here: the modifier secondaryIconAccessibilityLabel(_:) does not exist in the pinned DashUIKit revision, so this branch does not build on its own yet.

What was done?

  • SwapOrderMetadataProvider.secondaryIconLabel(for:): "Failed" for exactly the statuses that show the error badge, nil otherwise. BuySwapOrderItem.errorBadgeLabel reads it, so the order row and the transaction row word it the same way; a stuck order keeps the badge unnamed, since its status text already says it.
  • TxRowMetadata.secondaryIconLabel carries the label; HomeView passes it to the badge only when the badge shown is the metadata's own (not a route or direction badge).
  • The existing "Failed" string is reused; the catalog only gains a comment.

How Has This Been Tested?

  • Built and ran DashWalletTests (3359 tests, 0 failures) on the iPhone 17 simulator, iOS 26.5, against the DashUIKit branch of Fix/fixes for version234 #91 swapped in locally (not committed).
  • New test testOnlyAFailedOrderNamesItsErrorBadge: every status that shows the error badge names it "Failed"; no other status does.
  • scripts/a11y_audit.py --check, check_test_target_membership.py.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • ADR: no significant decision
  • Nothing in this PR holds customer data, unfixed vulnerability detail, secrets, or step-by-step attack detail against keys, PIN or encryption

🤖 Generated with Claude Code

DashUIKit's TransactionView hides its corner badge from VoiceOver unless the host names it. The error badge of a failed, refunded or expired swap is the only sign of that state, so it is named "Failed"; the other badges repeat the row's text and stay hidden. Needs the DashUIKit release with secondaryIconAccessibilityLabel(_:).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thepastaclaw

Copy link
Copy Markdown
Contributor

🕓 Review not started yet because this PR is a draft.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit 7541932. Normal review starts when eligible; priority review starts as soon as a slot is available.

This branch has not been deployed

No deployments
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.

2 participants