mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 11:37:09 +00:00
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:
1 parent
8e9ac938f3
commit
0dda618187
3 files changed
+65
-74
No files matched your search
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user