Fix some contentDescription.
This commit is contained in:
parent
b62f1ebb05
commit
88a7cc9740
6 changed files with 15 additions and 9 deletions
|
|
@ -60,7 +60,7 @@ fun TimelineItemFileView(
|
|||
) {
|
||||
Icon(
|
||||
resourceId = CommonDrawables.ic_attachment,
|
||||
contentDescription = "OpenFile",
|
||||
contentDescription = null,
|
||||
tint = ElementTheme.materialColors.primary,
|
||||
modifier = Modifier
|
||||
.size(16.dp)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent
|
||||
import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContentProvider
|
||||
|
|
@ -34,6 +35,7 @@ import io.element.android.libraries.designsystem.modifiers.roundedBackground
|
|||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.matrix.ui.media.MediaRequestData
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
|
||||
@Composable
|
||||
fun TimelineItemVideoView(
|
||||
|
|
@ -56,7 +58,7 @@ fun TimelineItemVideoView(
|
|||
) {
|
||||
Image(
|
||||
Icons.Default.PlayArrow,
|
||||
contentDescription = "Play",
|
||||
contentDescription = stringResource(id = CommonStrings.a11y_play),
|
||||
colorFilter = ColorFilter.tint(Color.White),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
|||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||
import io.element.android.libraries.theme.ElementTheme
|
||||
import io.element.android.libraries.ui.strings.CommonStrings
|
||||
|
||||
@Composable
|
||||
fun TimelineEncryptedHistoryBannerView(
|
||||
|
|
@ -57,7 +58,7 @@ fun TimelineEncryptedHistoryBannerView(
|
|||
Icon(
|
||||
modifier = Modifier.size(20.dp),
|
||||
resourceId = CommonDrawables.ic_compound_info_solid,
|
||||
contentDescription = "Info",
|
||||
contentDescription = null,
|
||||
tint = ElementTheme.colors.iconInfoPrimary
|
||||
)
|
||||
Text(
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ fun BackButton(
|
|||
@Composable
|
||||
internal fun BackButtonPreview() = ElementThemedPreview {
|
||||
Column {
|
||||
BackButton(onClick = { }, enabled = true, contentDescription = "Back")
|
||||
BackButton(onClick = { }, enabled = false, contentDescription = "Back")
|
||||
BackButton(onClick = { }, enabled = true)
|
||||
BackButton(onClick = { }, enabled = false)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ private fun ContentToPreview() {
|
|||
val icon: @Composable () -> Unit = {
|
||||
Icon(
|
||||
imageVector = if (checked) Icons.Default.CheckCircle else Icons.Default.RadioButtonUnchecked,
|
||||
contentDescription = "IconToggleButton"
|
||||
contentDescription = null
|
||||
)
|
||||
}
|
||||
IconToggleButton(checked = checked, enabled = true, onCheckedChange = { checked = !checked }, content = icon)
|
||||
|
|
@ -79,7 +79,7 @@ private fun ContentToPreview() {
|
|||
val icon: @Composable () -> Unit = {
|
||||
Icon(
|
||||
imageVector = if (!checked) Icons.Default.CheckCircle else Icons.Default.RadioButtonUnchecked,
|
||||
contentDescription = "IconToggleButton"
|
||||
contentDescription = null
|
||||
)
|
||||
}
|
||||
IconToggleButton(checked = !checked, enabled = true, onCheckedChange = { checked = !checked }, content = icon)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,10 @@ internal fun MenuPreview() {
|
|||
for (i in 0..5) {
|
||||
val leadingIcon: @Composable (() -> Unit)? = if (i in 2..3) {
|
||||
@Composable {
|
||||
Icon(Icons.Filled.Favorite, contentDescription = "Favorite")
|
||||
Icon(
|
||||
imageVector = Icons.Filled.Favorite,
|
||||
contentDescription = null
|
||||
)
|
||||
}
|
||||
} else {
|
||||
null
|
||||
|
|
@ -53,7 +56,7 @@ internal fun MenuPreview() {
|
|||
@Composable {
|
||||
Icon(
|
||||
resourceId = CommonDrawables.ic_compound_chevron_right,
|
||||
contentDescription = "Favorite",
|
||||
contentDescription = null,
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue