From 5f197917d8490f660cd34f129f5f6e411a6b31dd Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 25 Apr 2026 23:33:24 +0700 Subject: [PATCH] fix(folio): use account_card:id desc, expose balance via text semantics --- .../kotlin/app/folio/feature/home/HomeScreen.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/folio/composeApp/src/commonMain/kotlin/app/folio/feature/home/HomeScreen.kt b/examples/folio/composeApp/src/commonMain/kotlin/app/folio/feature/home/HomeScreen.kt index f6345c9..ce18006 100644 --- a/examples/folio/composeApp/src/commonMain/kotlin/app/folio/feature/home/HomeScreen.kt +++ b/examples/folio/composeApp/src/commonMain/kotlin/app/folio/feature/home/HomeScreen.kt @@ -123,7 +123,7 @@ private fun AccountCard( .clip(RoundedCornerShape(RadiusLg)) .background(t.surface) .border(1.dp, t.border, RoundedCornerShape(RadiusLg)) - .semantics(mergeDescendants = true) { contentDescription = "account:$id:$balance" } + .semantics { contentDescription = "account_card:$id" } .clickable(role = Role.Button, onClick = onClick) .padding(16.dp), verticalAlignment = Alignment.CenterVertically, @@ -148,6 +148,11 @@ private fun AccountCard( ) Text(txnLabel, style = Type.caption, color = t.textMuted) } - Text(formatCents(balance), style = Type.bodyStrong, color = t.text) + Text( + formatCents(balance), + style = Type.bodyStrong, + color = t.text, + modifier = Modifier.semantics { contentDescription = "account_balance" }, + ) } }