Fix minor TalkBack issues in VaultScreen (#225)

This commit is contained in:
David Perez 2023-11-08 11:59:24 -06:00 committed by Álison Fernandes
parent 9c82e575a1
commit 0185456dca
2 changed files with 9 additions and 13 deletions

View file

@ -1,11 +1,9 @@
package com.x8bit.bitwarden.ui.platform.components package com.x8bit.bitwarden.ui.platform.components
import androidx.compose.foundation.layout.Box
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton import androidx.compose.material3.IconButton
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.colorResource import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
@ -36,16 +34,12 @@ fun BitwardenAccountActionItem(
val iconPainter = painterResource(id = R.drawable.ic_account_initials_container) val iconPainter = painterResource(id = R.drawable.ic_account_initials_container)
val contentDescription = stringResource(id = R.string.account) val contentDescription = stringResource(id = R.string.account)
Box( IconButton(onClick = onClick) {
contentAlignment = Alignment.Center, Icon(
) { painter = iconPainter,
IconButton(onClick = onClick) { contentDescription = contentDescription,
Icon( tint = color,
painter = iconPainter, )
contentDescription = contentDescription,
tint = color,
)
}
Text( Text(
text = initials, text = initials,
style = TextStyle( style = TextStyle(

View file

@ -7,6 +7,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
@ -29,7 +30,8 @@ fun BitwardenListHeaderTextWithSupportLabel(
.padding( .padding(
top = 12.dp, top = 12.dp,
bottom = 4.dp, bottom = 4.dp,
), )
.semantics(mergeDescendants = true) { },
horizontalArrangement = Arrangement.SpaceBetween, horizontalArrangement = Arrangement.SpaceBetween,
) { ) {
Text( Text(