Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Jetpack Compose component used:LazyColumn, LazyRow, Column, Spacer, Text, Box
Android Studio Build: Android Studio Jellyfish | 2023.3.1 Patch 1
Kotlin version: 1.9.0
Steps to Reproduce or Code Sample to Reproduce:
- Open the app, turn on talkback.
- Make talkback focus any carousel in the screen that has more elements above it.
- Scroll the carousel that has the focus until the element that has the focus is no longer visible in the screen.
- If real device: Scroll in the carousel using 2 fingers
- If simulator: Scroll using the simulator gestures
Issues:
- Once the element that had the focus is no longer visible in the screen the talkback focus is moving to the very first visible element in the screen.
- Similar to the issue above but sometimes is switching the focus randomly to another carousel bellow the one that i did swipe.
(see video: real-device-talkback-on-swipping-with-2-fingers.mov)
Notes:
Doing the same in the Android Studio simulator, and using the simulator gestures navigation instead of the 2 fingers that we need to use in a real device is working fine, focus is not jumping to random places. Instead is focusing the next visible element in the carousel in which i'm doing the scroll and that has a element focused
(see video: demo-app-talkback-with-simulator0gestures.mov)
With real devices, the focus should behave similar to what we are getting in the simulator? If inside my carousel talkback is focusing an element and then i start scrolling left to right or right to left in that carousel... Move the focus to the next visible element inside the carousel in which i'm scrolling and has an element focused?
code:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
DummyComposeProjectTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.onPrimary
) {
LazyColumn(
contentPadding = PaddingValues(16.dp)
) {
items(10) {
Column {
Text(text = "Row $it")
Spacer(modifier = Modifier.size(8.dp))
Rail()
}
}
}
}
}
}
}
@Composable
fun Rail() {
LazyRow {
items(10) {
Box(
modifier = Modifier
.padding(16.dp)
.size(100.dp)
.background(Color.Red)
.aspectRatio(1f)
) {
Text(
text = "$it",
modifier = Modifier.align(Alignment.Center)
)
}
}
}
}
}