Lucas Kivi
03/25/2025, 4:04 AMText
that is fed an AnnotatedString
with a LinkAnnotation
is focused first on a given screen?
Code and media in the 🧵Lucas Kivi
03/25/2025, 4:05 AMScaffold(
topBar = {
TopAppBar(title = { Text("Talkback Testing") })
},
...
) { innerPadding ->
Column(...) {
Text("First normal text element")
Text(
buildAnnotatedString {
append("If I could click something, I would click ")
val link =
LinkAnnotation.Clickable(
"special_tag",
TextLinkStyles(SpanStyle(color = Color.Blue))
) {
println("Clickable link clicked")
}
withLink(link) { append("here") }
append(".")
}
)
Text("Second normal text element")
}
}
This code yields this behavior:Lucas Kivi
03/25/2025, 4:05 AMAnnotatedString
filled Text
and then goes to the top bar.
This does seem a bit odd, but I am not an accessibility user, so I am curious if this is intended behavior and why? Otherwise I will submit an issue and try and devise a work around ❤️dorche
03/25/2025, 12:46 PMLucas Kivi
03/25/2025, 2:24 PMLucas Kivi
03/25/2025, 4:41 PMLucas Kivi
03/25/2025, 8:29 PM