Status Update
Comments
mn...@google.com <mn...@google.com>
ut...@expediagroup.com <ut...@expediagroup.com> #2
ut...@gmail.com <ut...@gmail.com> #3
Hi, I am facing the same issue. I have created a skip link using focusrequester. When a user clicks this skip link, it should move the talkback focus to the focusRequester node. However, it only works one time and never again.
Even I tried hacking it around by delaying and calling requestFocus()
twice, but nothing works.
I am on Compose 1.5.4
kl...@google.com <kl...@google.com> #4
Is this something that could be solved with
ta...@gmail.com <ta...@gmail.com> #5
I was able to use LiveRegion to announce the element, but not to focus on it.
so...@google.com <so...@google.com> #6
For original request:
For
Description
Jetpack Compose version: 1.5.1
Jetpack Compose component used:
Android Studio Build: 2023.1.1 Beta 5 (Hedgehog)
Kotlin version: 1.9.10
Steps to Reproduce or Code Sample to Reproduce:
I have a sample project attached below! I have a series of "pages" with each page having a "Next" button that takes the user to the next page. Whenever the user clicks "Next", the page content (title, subtitle, image) changes. I would like the focus to be reset to the page title when the user clicks "Next". However, this doesn't seem to be working as expected with
focusRequester
.FocusRequester.requestFocus()
does get called, but inFocusTransactions.kt
, I see thatperformRequestFocus()
is hitting the case where the node is marked as already "Active", even when it's not. So nothing happens and the focus is not requested.Things I have tried that didn't work:
LocalFocusManager.current.clearFocus()
focusRequester.requestFocus()
twicefocusRequester.requestFocus()
after a long delaySimilar issue found on StackOverflow:https://stackoverflow.com/questions/74391260/jetpack-compose-requestfocus-works-only-once
Possibly related similar issues found on IssueTracker:
Repro steps for the attached sample app/code: