Bug 1809815 - Ensure Show from the Recently visited section is seen by Talkback as a button.

fenix/113.0
GitStart 2 years ago committed by mergify[bot]
parent 01812ad724
commit dd1dfbc23c

@ -8,8 +8,8 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.text.ClickableText
import androidx.compose.material.Text
import androidx.compose.material.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@ -17,7 +17,6 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
@ -104,18 +103,20 @@ private fun HomeSectionHeaderContent(
)
onShowAllClick?.let {
ClickableText(
text = AnnotatedString(text = stringResource(id = R.string.recent_tabs_show_all)),
modifier = Modifier.padding(start = 16.dp)
.semantics {
contentDescription = description
},
style = TextStyle(
color = showAllTextColor,
fontSize = 14.sp,
),
onClick = { onShowAllClick() },
)
TextButton(onClick = { onShowAllClick() }) {
Text(
text = stringResource(id = R.string.recent_tabs_show_all),
modifier = Modifier
.padding(start = 16.dp)
.semantics {
contentDescription = description
},
style = TextStyle(
color = showAllTextColor,
fontSize = 14.sp,
),
)
}
}
}
}

Loading…
Cancel
Save