From 90282416293db306c9c749e79f8c9eeec6fe2e13 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 13 Jun 2025 12:43:19 +0200 Subject: [PATCH] A11Y: add missing content description to the delete answer button. --- .../element/android/features/poll/impl/create/CreatePollView.kt | 2 +- features/poll/impl/src/main/res/values/localazy.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollView.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollView.kt index f8384279bf..038fb397f3 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollView.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollView.kt @@ -143,7 +143,7 @@ fun CreatePollView( trailingContent = ListItemContent.Custom { Icon( imageVector = CompoundIcons.Delete(), - contentDescription = null, + contentDescription = stringResource(R.string.screen_create_poll_delete_option_a11y, answer.text), modifier = Modifier.clickable(answer.canDelete) { state.eventSink(CreatePollEvents.RemoveAnswer(index)) }, diff --git a/features/poll/impl/src/main/res/values/localazy.xml b/features/poll/impl/src/main/res/values/localazy.xml index 7a7a15ea3c..6019d908b4 100644 --- a/features/poll/impl/src/main/res/values/localazy.xml +++ b/features/poll/impl/src/main/res/values/localazy.xml @@ -5,6 +5,7 @@ "Hide votes" "Option %1$d" "Your changes have not been saved. Are you sure you want to go back?" + "Delete option %1$s" "Question or topic" "What is the poll about?" "Create Poll"