PM-40497: bug: Update the plan price row announcement for accessibility (#7170)

This commit is contained in:
David Perez authored and GitHub committed 2026-07-16 14:59:51 +00:00
1 parent 5c13e2644c
commit 1b8dbd77de
2 files changed
+18 -3

No files matched your search

@@ -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(),
)
}
}
+1
View File
@@ -1277,6 +1277,7 @@ Do you want to switch to this account?</string>
<string name="upgrade_pending_message">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.</string>
<string name="unlock_premium_features">Unlock more advanced features with a Premium plan.</string>
<string name="per_month_cancel_anytime">/ month · Cancel anytime</string>
<string name="per_month_cancel_anytime_content_description">%1$s per month, cancel anytime</string>
<string name="built_in_authenticator">Built-in authenticator</string>
<string name="emergency_access">Emergency access</string>
<string name="secure_file_storage">Secure file storage</string>