fix(folio-web): drop aria-label data-carrier abuse

Account cards now expose data-account-id + data-balance attrs and use a
human-readable aria-label. total-balance / ledger / ledger-balance carry
data-cents and data-txn-count instead of stuffing values into title.
Spec rewritten to read structured attrs via object-form selectors.
This commit is contained in:
pj committed 2026-04-27 18:55:42 +07:00
1 parent 8e9ac938f3
commit 0dda618187
3 files changed
+65 -74

No files matched your search

+2 -3
View File
@@ -86,8 +86,7 @@ export function HomePage(props: {
<div
id="total-balance"
className="balance-display"
data-value={totalBalance}
title={String(totalBalance)}
data-cents={totalBalance}
>
<span className="balance-label">Total balance</span>
<span
@@ -164,7 +163,7 @@ export function HomePage(props: {
data-name={a.name}
data-balance={bal}
data-txn-count={countTxns(txns, a.id)}
aria-label={'account:' + a.id + ':' + bal}
aria-label={`${a.name}, ${formatCents(bal)}`}
onClick={() => navigate(`/accounts/${a.id}`)}
>
<span className="account-avatar" aria-hidden="true">
+1 -3
View File
@@ -93,13 +93,11 @@ export function LedgerPage(props: {
data-account-id={props.accountId}
data-account-name={account?.name ?? ''}
data-txn-count={txns?.length ?? 0}
title={String(txns?.length ?? 0)}
>
<div
id="ledger-balance"
className="balance-display"
data-value={balance}
title={String(balance)}
data-cents={balance}
>
<span className="balance-label">Balance</span>
<span