Skip to content

fix(transaction): read a transaction row as one element in its own order - #93

Merged
romchornyi merged 4 commits into
dashpay:masterfrom
romchornyi-pitcrew:fix/transaction-row-reading-order
Dec 4, 2026
Merged

romchornyi merged 4 commits into
dashpay:masterfrom
romchornyi-pitcrew:fix/transaction-row-reading-order

Conversation

@romchornyi-pitcrew

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Part of #38. Left to its children, a TransactionView row was read by position on screen: the amount is centered vertically, so it came before the time. A row with an action was already one button, but a named badge (secondaryIconAccessibilityLabel(_:)) was read first. Measured by walking the accessibility tree the way VoiceOver does (iPhone 17 simulator, iOS 26.5):

Row Before After
No action 4 stops: "Received" · "+1,5 Dash" · "8:34 AM" · "$ 40" 1 stop: "Received, 8:34 AM, +1,5 Dash, $ 40"
With action, named badge "Failed, Converted, 8:34 AM, Processing, -1,5 Dash, $ 40" (button) "Converted, 8:34 AM, Processing, Failed, -1,5 Dash, $ 40" (button)

What was done?

  • The row is one accessibility element whose label is built in the row's own order: top text, title, subtitle, details, the named badge, the status text (e.g. "Locked"), the amount with its currency, the fiat value.
  • Icons stay out of it, except a secondaryIcon the host named. A host's iconView (an avatar, a logo) and amountAccessorySystemImage are not read.
  • docs/foundation.md describes the order.

No public API change. Rows with an action still start with the title, so a UI test matching ^Sent, 8:34… still matches.

How Has This Been Tested?

  • The before/after table above, from a throwaway app.
  • VoiceOverLabelTests.testATransactionRowReadsTitleFirstAndTheAmountLast pins the order, with and without a named badge and with only the required fields. Whole suite and conventions.sh pass.

Before / After

  • No visual change (refactor, tests, docs). Say why in "What was done?".

Only accessibility changes; nothing is drawn differently.

Breaking Changes

None in the API. A row without an action is one VoiceOver stop instead of several, and a named badge is read after the details instead of first.

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

🤖 Generated with Claude Code

VoiceOver read a row by position, so the vertically centered amount came before the time, and a named badge came before the title. The row is now one element labeled title, subtitle, details, badge, status, amount, fiat. Part of dashpay#38.

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

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • 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

@romchornyi romchornyi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No blockers, no major · 2 non-blocking recommendations — reviewed at 55a6b11aea

Level Verdict
1 · Idea ✅ valid A row without an action was four VoiceOver stops in screen-position order, amount before time (#38).
2 · Architecture ✅ right layer The component owns the reading order; hosts change nothing.
3 · Completeness ✅ complete Top text, title, subtitle, details, the named badge, status, amount with currency, fiat; the test covers the order, the named badge and the minimal row.
4 · Code ✅ clean The badge joins only when both secondaryIcon and its label are set; a row with an action stays one button with the same label.
2 non-blocking recommendations
  1. amountAccessorySystemImage is not read — on an amountSign: .none row (a wallet-internal transfer) the direction now reaches VoiceOver only through the title. Worth one line in docs/foundation.md: such a row names its direction in the title.
  2. A host's iconView label is ignored — an avatar's accessibility label (a contact's name) no longer reaches VoiceOver. The same doc line could say the title carries anything the icon view means.
Review details

Levels 1–3 and the code read at this head, including the host app's rows built on TransactionView. Not checked with VoiceOver on a device.

🤖 Reviewed with Claude Code

amountAccessorySystemImage and an iconView's label are not read, so the title or details name the direction or the contact.

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

Copy link
Copy Markdown
Contributor Author

Both recommendations addressed in a747c32: docs/foundation.md now says the row's icons are not read (amountAccessorySystemImage, an iconView's own label), so a row with amountSign: .none names its direction in the title and a row with a contact's avatar names the contact in the title or details. Docs only.

@romchornyi romchornyi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Both recommendations closed · 1 nit — re-reviewed at a747c32764

Closed since the last review

  • docs/foundation.md says a row's icons are not read, so the title names the direction of an amountSign: .none row and the title or details name the contact behind an iconView avatar.
1 nit
  1. The docs now contradict themselves on amountAccessorySystemImage — foundation.md#L139 still lists TransactionView.amountAccessorySystemImage under "Still read on their own", while the new paragraph below says it does not reach VoiceOver (the row ignores its children). Dropping it from that list is a one-line fix. (verified by reading)

🤖 Reviewed with Claude Code

romchornyi-pitcrew and others added 2 commits December 4, 2026 09:33
… read

The row is one element now, so the symbol is not read on its own.

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

@romchornyi romchornyi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Nit closed · nothing open — re-reviewed at 7bbba5182d

Closed since the last review

  • amountAccessorySystemImage left the "Still read on their own" list; docs/foundation.md now says the same thing in both paragraphs.
  • The merge of master (with #92) had no conflicts: the row's spoken amount and DashAmount share spokenAmount, so both read "-1.5 Dash".

🤖 Reviewed with Claude Code

@romchornyi
romchornyi merged commit bc9f2cd into dashpay:master Dec 4, 2026
9 checks passed
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