From 0b6469e156b7ec2e3729271be2df3a3a2a93ff06 Mon Sep 17 00:00:00 2001 From: David Perez Date: Thu, 16 Jul 2026 09:21:37 -0500 Subject: [PATCH] PM-40497: Update the plan price row announcement for accessibility --- .../feature/premium/plan/PlanScreen.kt | 20 ++++++++++++++++--- ui/src/main/res/values/strings.xml | 1 + 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreen.kt b/app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreen.kt index 9055081d237..5fcd8817f91 100644 --- a/app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreen.kt +++ b/app/src/main/kotlin/com/x8bit/bitwarden/ui/platform/feature/premium/plan/PlanScreen.kt @@ -38,6 +38,9 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.hideFromAccessibility +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.style.TextAlign @@ -366,22 +369,33 @@ private fun PriceRow( rate: String, modifier: Modifier = Modifier, ) { + val formattedContentDescription = stringResource( + id = BitwardenString.per_month_cancel_anytime_content_description, + formatArgs = arrayOf(rate), + ) Row( horizontalArrangement = Arrangement.Center, - modifier = modifier, + modifier = modifier + .semantics(mergeDescendants = true) { + contentDescription = formattedContentDescription + }, ) { Text( text = rate, style = BitwardenTheme.typography.labelMedium, color = BitwardenTheme.colorScheme.text.primary, - modifier = Modifier.alignByBaseline(), + modifier = Modifier + .semantics { hideFromAccessibility() } + .alignByBaseline(), ) Spacer(modifier = Modifier.width(width = 4.dp)) Text( text = stringResource(id = BitwardenString.per_month_cancel_anytime), style = BitwardenTheme.typography.labelSmall, color = BitwardenTheme.colorScheme.text.primary, - modifier = Modifier.alignByBaseline(), + modifier = Modifier + .semantics { hideFromAccessibility() } + .alignByBaseline(), ) } } diff --git a/ui/src/main/res/values/strings.xml b/ui/src/main/res/values/strings.xml index a2daf0aa3c5..97fd7fbead6 100644 --- a/ui/src/main/res/values/strings.xml +++ b/ui/src/main/res/values/strings.xml @@ -1277,6 +1277,7 @@ Do you want to switch to this account? Your upgrade is being processed. You’ll remain on the free plan until it’s complete. Sync now to check, or continue and it will update automatically. Unlock more advanced features with a Premium plan. / month · Cancel anytime + %1$s per month, cancel anytime Built-in authenticator Emergency access Secure file storage