Merge pull request #1845 from vector-im/feature/bma/sendingStateA11y
Content description: add for sending state and fix other issues.
This commit is contained in:
commit
68c4f1e6bc
26 changed files with 90 additions and 49 deletions
|
|
@ -70,7 +70,7 @@ fun RoundedIconAtom(
|
|||
tint = tint,
|
||||
resourceId = resourceId,
|
||||
imageVector = imageVector,
|
||||
contentDescription = "",
|
||||
contentDescription = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ fun PreferenceIcon(
|
|||
Icon(
|
||||
imageVector = icon,
|
||||
resourceId = iconResourceId,
|
||||
contentDescription = "",
|
||||
contentDescription = null,
|
||||
tint = tintColor ?: enabled.toSecondaryEnabledColor(),
|
||||
modifier = Modifier
|
||||
.padding(end = 16.dp)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ internal fun FloatingActionButtonPreview() =
|
|||
private fun ContentToPreview() {
|
||||
Box(modifier = Modifier.padding(8.dp)) {
|
||||
FloatingActionButton(onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,5 +145,5 @@ internal fun IconImageVectorPreview() =
|
|||
|
||||
@Composable
|
||||
private fun ContentToPreview() {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,20 +67,20 @@ private fun ContentToPreview() {
|
|||
CompositionLocalProvider(LocalContentColor provides ElementTheme.colors.iconPrimary) {
|
||||
Row {
|
||||
IconButton(onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
IconButton(enabled = false, onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
CompositionLocalProvider(LocalContentColor provides ElementTheme.colors.iconSecondary) {
|
||||
Row {
|
||||
IconButton(onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
IconButton(enabled = false, onClick = {}) {
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
|
||||
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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