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