From 04881a5c24ef80a110e0e45db50cedee0d4e2845 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Fri, 29 May 2026 09:59:17 +0200 Subject: [PATCH 1/7] no Ellipsis --- .../androidMain/res/values-sv-rSE/strings.xml | 18 +++++++++++++++++- .../src/androidMain/res/values/strings.xml | 16 ++++++++++++++++ .../values-sv-rSE/strings.xml | 19 +++++++++++++++++-- .../composeResources/values/strings.xml | 17 ++++++++++++++++- .../puppyguide/PuppyGuideDestination.kt | 5 ++--- 5 files changed, 68 insertions(+), 7 deletions(-) diff --git a/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml b/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml index 1121f472a0..32472cd157 100644 --- a/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml +++ b/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml @@ -522,6 +522,7 @@ Fråga angående skadeanmälan - Fordon reg. %1$s Välj land och språk Logga ut + Manage your payment methods Aktivera ditt försäkringsskydd igen genom att kontakta oss när din betalning har registrerats Få ett prisförslag Se över kontaktuppgifter @@ -680,7 +681,7 @@ Reseintyg Din profil Se guider - I valpguiden hittar du användbara artiklar som hjälper dig med allt från första veterinärbesöket till hur du väljer rätt foder. + I valpguiden får du svar på de vanligaste frågorna som rör valpens första tid. Utvalda guider Läst Inte hjälpsam @@ -997,6 +998,7 @@ Vi kan tyvärr inte ge dig ett pris. Var god se till att du har Kivras digitala brevlåda och försök igen.\n\nDu kan skaffa digital brevlåda hos Kivra här: https://kivra.se/sv/privat/sa-funkar-det/digitala-brev-brevlada Rabattnamn: %s ändra värde + Bild Tryck för mer information Kampanjikon Informationsikon @@ -1279,6 +1281,20 @@ Läs om ditt fullständiga försäkringsskydd nedan. Appinformation Information + Fortsätt köpet + Avvisa erbjudandet + + Erbjudandet löper ut om %1$d dag + Erbjudandet löper ut om %1$d dagar + + + Erbjudandet löper ut om %1$d timme + Erbjudandet löper ut om %1$d timmar + + + Erbjudandet löper ut om %1$d minut + Erbjudandet löper ut om %1$d minuter + Skriv meddelande Autogiro är anslutet! Vi kunde inte ansluta ditt bankkonto. Vänligen försök igen eller skriv till oss direkt i appen. diff --git a/app/core/core-resources/src/androidMain/res/values/strings.xml b/app/core/core-resources/src/androidMain/res/values/strings.xml index ab249a9e6d..ffd94b4dd7 100644 --- a/app/core/core-resources/src/androidMain/res/values/strings.xml +++ b/app/core/core-resources/src/androidMain/res/values/strings.xml @@ -522,6 +522,7 @@ Question regarding claim, Vehicle reg. %1$s Preferences Logout + Manage your payment methods Activate your coverage again by contacting us once your payment has been processed Get a price quote Review contact info @@ -997,6 +998,7 @@ Sorry, we couldn’t generate a price. Please make sure you have Kivra\'s digital mailbox and then try again. \n\nYou can get Kivra\'s digital mailbox here: https://kivra.se/en/private/how-it-works/digital-letters-mailbox. Discount name: %s change value + Image Tap for more info Campaign image Information image @@ -1279,6 +1281,20 @@ Read the full coverage of your insurances below. App information Information + Continue purchase + Dismiss offer + + The offer expires in %1$d day + The offer expires in %1$d days + + + The offer expires in %1$d hour + The offer expires in %1$d hours + + + The offer expires in %1$d minute + The offer expires in %1$d minutes + Write message Direct debit connected! We were unable to add your payment method. Please try again or send us a message here in the app. diff --git a/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml b/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml index ee88808b69..0601c4b901 100644 --- a/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml +++ b/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml @@ -1,4 +1,3 @@ - Svenska English @@ -522,6 +521,7 @@ Fråga angående skadeanmälan - Fordon reg. %1$s Välj land och språk Logga ut + Manage your payment methods Aktivera ditt försäkringsskydd igen genom att kontakta oss när din betalning har registrerats Få ett prisförslag Se över kontaktuppgifter @@ -680,7 +680,7 @@ Reseintyg Din profil Se guider - I valpguiden hittar du användbara artiklar som hjälper dig med allt från första veterinärbesöket till hur du väljer rätt foder. + I valpguiden får du svar på de vanligaste frågorna som rör valpens första tid. Utvalda guider Läst Inte hjälpsam @@ -997,6 +997,7 @@ Vi kan tyvärr inte ge dig ett pris. Var god se till att du har Kivras digitala brevlåda och försök igen.\n\nDu kan skaffa digital brevlåda hos Kivra här: https://kivra.se/sv/privat/sa-funkar-det/digitala-brev-brevlada Rabattnamn: %1$s ändra värde + Bild Tryck för mer information Kampanjikon Informationsikon @@ -1279,6 +1280,20 @@ Läs om ditt fullständiga försäkringsskydd nedan. Appinformation Information + Fortsätt köpet + Avvisa erbjudandet + + Erbjudandet löper ut om %1$d dag + Erbjudandet löper ut om %1$d dagar + + + Erbjudandet löper ut om %1$d timme + Erbjudandet löper ut om %1$d timmar + + + Erbjudandet löper ut om %1$d minut + Erbjudandet löper ut om %1$d minuter + Skriv meddelande Autogiro är anslutet! Vi kunde inte ansluta ditt bankkonto. Vänligen försök igen eller skriv till oss direkt i appen. diff --git a/app/core/core-resources/src/commonMain/composeResources/values/strings.xml b/app/core/core-resources/src/commonMain/composeResources/values/strings.xml index ff57e81a6a..0b531c880a 100644 --- a/app/core/core-resources/src/commonMain/composeResources/values/strings.xml +++ b/app/core/core-resources/src/commonMain/composeResources/values/strings.xml @@ -1,4 +1,3 @@ - Svenska English @@ -522,6 +521,7 @@ Question regarding claim, Vehicle reg. %1$s Preferences Logout + Manage your payment methods Activate your coverage again by contacting us once your payment has been processed Get a price quote Review contact info @@ -997,6 +997,7 @@ Sorry, we couldn’t generate a price. Please make sure you have Kivra's digital mailbox and then try again. \n\nYou can get Kivra's digital mailbox here: https://kivra.se/en/private/how-it-works/digital-letters-mailbox. Discount name: %1$s change value + Image Tap for more info Campaign image Information image @@ -1279,6 +1280,20 @@ Read the full coverage of your insurances below. App information Information + Continue purchase + Dismiss offer + + The offer expires in %1$d day + The offer expires in %1$d days + + + The offer expires in %1$d hour + The offer expires in %1$d hours + + + The offer expires in %1$d minute + The offer expires in %1$d minutes + Write message Direct debit connected! We were unable to add your payment method. Please try again or send us a message here in the app. diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt index 77e1b7a74e..3a397073fe 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt @@ -78,6 +78,7 @@ import hedvig.resources.PUPPY_GUIDE_INFO import hedvig.resources.PUPPY_GUIDE_LABEL_READ import hedvig.resources.PUPPY_GUIDE_TITLE import hedvig.resources.Res +import hedvig.resources.VOICEOVER_CHAT_IMAGE import hedvig.resources.hundar_badar_pet import kotlinx.coroutines.launch import org.jetbrains.compose.resources.painterResource @@ -362,7 +363,7 @@ private fun ArticleItem( val fallbackPainter: Painter = ColorPainter(Color.Black.copy(alpha = 0.7f)) AsyncImage( model = story.image, - contentDescription = EmptyContentDescription, + contentDescription = stringResource(Res.string.VOICEOVER_CHAT_IMAGE), placeholder = fallbackPainter, error = fallbackPainter, fallback = fallbackPainter, @@ -386,8 +387,6 @@ private fun ArticleItem( HedvigText( story.title, style = HedvigTheme.typography.label, - maxLines = 1, - overflow = TextOverflow.Ellipsis, ) HedvigText( story.subtitle, From 7aa97b03a91a72b95f11a4af9cf674712c1f1add Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Fri, 29 May 2026 11:37:15 +0200 Subject: [PATCH 2/7] adjust spacings --- .../feature/help/center/puppyguide/PuppyArticleDestination.kt | 2 +- .../com/hedvig/android/feature/help/center/ui/MarkdownText.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt index 6ae4fb3a12..44f7c7f4a1 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt @@ -211,7 +211,7 @@ private fun PuppyArticleSuccessScreen( HedvigTheme.typography.bodySmall .copy(color = HedvigTheme.colorScheme.textSecondaryTranslucent), ) { - MarkdownText(uiState.story.content, withArticleStyle = true) + MarkdownText(uiState.story.content.replace(Regex("\n\\s*\n"), "\n\n\u200b\n\n"), withArticleStyle = true) } Spacer(Modifier.height(48.dp)) HedvigText(stringResource(Res.string.PUPPY_GUIDE_RATING_QUESTION)) diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/ui/MarkdownText.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/ui/MarkdownText.kt index 44e0864469..dcdaff31c5 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/ui/MarkdownText.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/ui/MarkdownText.kt @@ -122,7 +122,7 @@ fun MarkdownText(markdown: String, modifier: Modifier = Modifier, withArticleSty colors = markdownColors, typography = markdownTypography, padding = object : MarkdownPadding { - override val block: Dp = 6.dp + override val block: Dp = 0.dp override val blockQuote: PaddingValues = PaddingValues(0.dp) override val blockQuoteBar: PaddingValues.Absolute = PaddingValues.Absolute(0.dp) override val blockQuoteText: PaddingValues = PaddingValues(0.dp) From ebe732d045166765f50d700ae251770b92e681c7 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Fri, 29 May 2026 13:14:17 +0200 Subject: [PATCH 3/7] read label --- .../androidMain/res/values-sv-rSE/strings.xml | 1 + .../src/androidMain/res/values/strings.xml | 1 + .../composeResources/values-sv-rSE/strings.xml | 1 + .../composeResources/values/strings.xml | 1 + .../puppyguide/PuppyArticleDestination.kt | 3 ++- .../center/puppyguide/PuppyGuideDestination.kt | 18 ++++++++++++------ 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml b/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml index 32472cd157..04fbb46116 100644 --- a/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml +++ b/app/core/core-resources/src/androidMain/res/values-sv-rSE/strings.xml @@ -15,6 +15,7 @@ av Pausa Spela + Läst Skrolla längst ner på sidan Inskickat värde diff --git a/app/core/core-resources/src/androidMain/res/values/strings.xml b/app/core/core-resources/src/androidMain/res/values/strings.xml index ffd94b4dd7..d25b79a81f 100644 --- a/app/core/core-resources/src/androidMain/res/values/strings.xml +++ b/app/core/core-resources/src/androidMain/res/values/strings.xml @@ -15,6 +15,7 @@ of Pause Play + Red Scroll to bottom Submitted value diff --git a/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml b/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml index 0601c4b901..f541fcefc3 100644 --- a/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml +++ b/app/core/core-resources/src/commonMain/composeResources/values-sv-rSE/strings.xml @@ -14,6 +14,7 @@ av Pausa Spela + Läst Skrolla längst ner på sidan Inskickat värde diff --git a/app/core/core-resources/src/commonMain/composeResources/values/strings.xml b/app/core/core-resources/src/commonMain/composeResources/values/strings.xml index 0b531c880a..18bdcd8887 100644 --- a/app/core/core-resources/src/commonMain/composeResources/values/strings.xml +++ b/app/core/core-resources/src/commonMain/composeResources/values/strings.xml @@ -14,6 +14,7 @@ of Pause Play + Red Scroll to bottom Submitted value diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt index 44f7c7f4a1..b87bcbe37e 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt @@ -63,6 +63,7 @@ import hedvig.resources.PUPPY_GUIDE_RATING_NOT_HELPFUL import hedvig.resources.PUPPY_GUIDE_RATING_QUESTION import hedvig.resources.PUPPY_GUIDE_RATING_VERY_HELPFUL import hedvig.resources.Res +import hedvig.resources.VOICEOVER_CHAT_IMAGE import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.flow.debounce import kotlinx.coroutines.flow.filter @@ -183,7 +184,7 @@ private fun PuppyArticleSuccessScreen( val fallbackPainter: Painter = ColorPainter(Color.Black.copy(alpha = 0.7f)) AsyncImage( model = uiState.story.image, - contentDescription = EmptyContentDescription, + contentDescription = stringResource(Res.string.VOICEOVER_CHAT_IMAGE), placeholder = fallbackPainter, error = fallbackPainter, fallback = fallbackPainter, diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt index 3a397073fe..ea9bf991ef 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt @@ -48,8 +48,9 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalHapticFeedback +import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.style.TextAlign -import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.tooling.preview.datasource.CollectionPreviewParameterProvider import androidx.compose.ui.unit.Dp @@ -74,11 +75,11 @@ import com.hedvig.android.design.system.hedvig.icon.Checkmark import com.hedvig.android.design.system.hedvig.icon.HedvigIcons import com.hedvig.android.design.system.hedvig.rememberPreviewImageLoader import com.hedvig.android.feature.help.center.data.PuppyGuideStory +import hedvig.resources.A11Y_READ_LABEL_HACK import hedvig.resources.PUPPY_GUIDE_INFO import hedvig.resources.PUPPY_GUIDE_LABEL_READ import hedvig.resources.PUPPY_GUIDE_TITLE import hedvig.resources.Res -import hedvig.resources.VOICEOVER_CHAT_IMAGE import hedvig.resources.hundar_badar_pet import kotlinx.coroutines.launch import org.jetbrains.compose.resources.painterResource @@ -345,6 +346,7 @@ private fun ArticleItem( val interactionSource = remember { MutableInteractionSource() } Column( modifier + .semantics(true) {} .width(size) .clickable( interactionSource = interactionSource, @@ -363,7 +365,7 @@ private fun ArticleItem( val fallbackPainter: Painter = ColorPainter(Color.Black.copy(alpha = 0.7f)) AsyncImage( model = story.image, - contentDescription = stringResource(Res.string.VOICEOVER_CHAT_IMAGE), + contentDescription = EmptyContentDescription, placeholder = fallbackPainter, error = fallbackPainter, fallback = fallbackPainter, @@ -412,10 +414,14 @@ private fun ReadLabel(modifier: Modifier = Modifier) { ), verticalAlignment = Alignment.CenterVertically, ) { + val audioLabel = stringResource(Res.string.A11Y_READ_LABEL_HACK) HedvigText( - text = stringResource(Res.string.PUPPY_GUIDE_LABEL_READ), - textAlign = TextAlign.Center, - style = HedvigTheme.typography.label, + text = stringResource(Res.string.PUPPY_GUIDE_LABEL_READ), + textAlign = TextAlign.Center, + style = HedvigTheme.typography.label, + modifier = Modifier.semantics { + contentDescription = audioLabel + }, ) Icon( HedvigIcons.Checkmark, From 7ea364dce31b46e6b88f2a0090fa474df0771684 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Fri, 29 May 2026 13:35:15 +0200 Subject: [PATCH 4/7] do not merge the valp card in the help center --- .../help/center/home/HelpCenterHomeDestination.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/home/HelpCenterHomeDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/home/HelpCenterHomeDestination.kt index c742d6653f..223654d697 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/home/HelpCenterHomeDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/home/HelpCenterHomeDestination.kt @@ -47,6 +47,9 @@ import androidx.compose.ui.draw.shadow import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalFocusManager +import androidx.compose.ui.semantics.heading +import androidx.compose.ui.semantics.isTraversalGroup +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter @@ -420,7 +423,10 @@ private fun ContentWithoutSearch( modifier = Modifier .padding(horizontal = 20.dp), ) { - HedvigText(stringResource(Res.string.HC_HOME_VIEW_QUESTION)) + HedvigText(stringResource(Res.string.HC_HOME_VIEW_QUESTION), + modifier = Modifier.semantics { + heading() + }) HedvigText( text = stringResource(Res.string.HC_HOME_VIEW_ANSWER), color = HedvigTheme.colorScheme.textSecondary, @@ -497,14 +503,13 @@ private fun ContentWithoutSearch( @Composable private fun PuppyGuideCard(onClick: () -> Unit, modifier: Modifier = Modifier) { HedvigCard( - onClick = onClick, color = HedvigTheme.colorScheme.backgroundPrimary, borderColor = HedvigTheme.colorScheme.borderSecondary, modifier = modifier .fillMaxWidth() .shadow(1.dp, HedvigTheme.shapes.cornerXLarge), ) { - Column { + Column{ Box(Modifier.align(Alignment.CenterHorizontally)) { Image( painter = painterResource(Res.drawable.hundar_badar_pet), From ba5970563f3f797b7c4dfa1e149faad26b5015c6 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Fri, 29 May 2026 13:38:47 +0200 Subject: [PATCH 5/7] image desc --- .../feature/help/center/puppyguide/PuppyGuideDestination.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt index ea9bf991ef..dcbf49731a 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt @@ -80,6 +80,7 @@ import hedvig.resources.PUPPY_GUIDE_INFO import hedvig.resources.PUPPY_GUIDE_LABEL_READ import hedvig.resources.PUPPY_GUIDE_TITLE import hedvig.resources.Res +import hedvig.resources.VOICEOVER_CHAT_IMAGE import hedvig.resources.hundar_badar_pet import kotlinx.coroutines.launch import org.jetbrains.compose.resources.painterResource @@ -199,7 +200,7 @@ private fun PuppyGuideSuccessScreen( ) { Image( painter = painterResource(Res.drawable.hundar_badar_pet), - contentDescription = null, + contentDescription =stringResource(Res.string.VOICEOVER_CHAT_IMAGE), contentScale = ContentScale.Crop, alignment = Alignment.Center, modifier = Modifier From 92d54436540b4aa52306e569b29ca70164825588 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Fri, 29 May 2026 13:59:38 +0200 Subject: [PATCH 6/7] change ArticleItem audio desc --- .../puppyguide/PuppyGuideDestination.kt | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt index dcbf49731a..b176dfce7a 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt @@ -48,7 +48,12 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.LocalHapticFeedback +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.semantics.clearAndSetSemantics import androidx.compose.ui.semantics.contentDescription +import androidx.compose.ui.semantics.hideFromAccessibility +import androidx.compose.ui.semantics.onClick +import androidx.compose.ui.semantics.role import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.PreviewParameter @@ -200,7 +205,7 @@ private fun PuppyGuideSuccessScreen( ) { Image( painter = painterResource(Res.drawable.hundar_badar_pet), - contentDescription =stringResource(Res.string.VOICEOVER_CHAT_IMAGE), + contentDescription = stringResource(Res.string.VOICEOVER_CHAT_IMAGE), contentScale = ContentScale.Crop, alignment = Alignment.Center, modifier = Modifier @@ -345,9 +350,19 @@ private fun ArticleItem( shape: Shape = HedvigTheme.shapes.cornerMedium, ) { val interactionSource = remember { MutableInteractionSource() } + val isRead = story.isRead || story.rating != null + val readAudioLabel = stringResource(Res.string.A11Y_READ_LABEL_HACK) + val audioDescription = "${story.title}, ${story.subtitle}. ${if (isRead) readAudioLabel else ""}." Column( modifier - .semantics(true) {} + .clearAndSetSemantics { + contentDescription = audioDescription + role = Role.Button + onClick(label = null) { + onNavigateToArticle(story) + true + } + } .width(size) .clickable( interactionSource = interactionSource, @@ -376,7 +391,7 @@ private fun ArticleItem( .size(size) .clip(shape), ) - if (story.isRead || story.rating != null) { + if (isRead) { Box( modifier = Modifier .matchParentSize() @@ -402,7 +417,9 @@ private fun ArticleItem( @Composable private fun ReadLabel(modifier: Modifier = Modifier) { Surface( - modifier = modifier, + modifier = modifier.semantics { + hideFromAccessibility() + }, shape = HedvigTheme.shapes.cornerXSmall, color = HedvigTheme.colorScheme.buttonSecondaryAltResting, ) { @@ -415,14 +432,10 @@ private fun ReadLabel(modifier: Modifier = Modifier) { ), verticalAlignment = Alignment.CenterVertically, ) { - val audioLabel = stringResource(Res.string.A11Y_READ_LABEL_HACK) HedvigText( - text = stringResource(Res.string.PUPPY_GUIDE_LABEL_READ), - textAlign = TextAlign.Center, - style = HedvigTheme.typography.label, - modifier = Modifier.semantics { - contentDescription = audioLabel - }, + text = stringResource(Res.string.PUPPY_GUIDE_LABEL_READ), + textAlign = TextAlign.Center, + style = HedvigTheme.typography.label, ) Icon( HedvigIcons.Checkmark, From 367bf5e70e70595544037bd27c1e806ce7604d79 Mon Sep 17 00:00:00 2001 From: mariiapanasetskaia Date: Fri, 29 May 2026 14:01:14 +0200 Subject: [PATCH 7/7] back with EmptyContentDescription for images --- .../feature/help/center/puppyguide/PuppyArticleDestination.kt | 3 +-- .../feature/help/center/puppyguide/PuppyGuideDestination.kt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt index b87bcbe37e..44f7c7f4a1 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyArticleDestination.kt @@ -63,7 +63,6 @@ import hedvig.resources.PUPPY_GUIDE_RATING_NOT_HELPFUL import hedvig.resources.PUPPY_GUIDE_RATING_QUESTION import hedvig.resources.PUPPY_GUIDE_RATING_VERY_HELPFUL import hedvig.resources.Res -import hedvig.resources.VOICEOVER_CHAT_IMAGE import kotlin.time.Duration.Companion.milliseconds import kotlinx.coroutines.flow.debounce import kotlinx.coroutines.flow.filter @@ -184,7 +183,7 @@ private fun PuppyArticleSuccessScreen( val fallbackPainter: Painter = ColorPainter(Color.Black.copy(alpha = 0.7f)) AsyncImage( model = uiState.story.image, - contentDescription = stringResource(Res.string.VOICEOVER_CHAT_IMAGE), + contentDescription = EmptyContentDescription, placeholder = fallbackPainter, error = fallbackPainter, fallback = fallbackPainter, diff --git a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt index b176dfce7a..077c2385b5 100644 --- a/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt +++ b/app/feature/feature-help-center/src/commonMain/kotlin/com/hedvig/android/feature/help/center/puppyguide/PuppyGuideDestination.kt @@ -85,7 +85,6 @@ import hedvig.resources.PUPPY_GUIDE_INFO import hedvig.resources.PUPPY_GUIDE_LABEL_READ import hedvig.resources.PUPPY_GUIDE_TITLE import hedvig.resources.Res -import hedvig.resources.VOICEOVER_CHAT_IMAGE import hedvig.resources.hundar_badar_pet import kotlinx.coroutines.launch import org.jetbrains.compose.resources.painterResource @@ -205,7 +204,7 @@ private fun PuppyGuideSuccessScreen( ) { Image( painter = painterResource(Res.drawable.hundar_badar_pet), - contentDescription = stringResource(Res.string.VOICEOVER_CHAT_IMAGE), + contentDescription = EmptyContentDescription, contentScale = ContentScale.Crop, alignment = Alignment.Center, modifier = Modifier