Dnyanesh M
Dnyanesh M

Reputation: 1409

Accessibility sequence not working with "HorizontalPager" in Android Jetpack Compose

I am using "HorizontalPager" in my app to display list of items. When I tern ON the accessibility and perform swipe action to move accessibility focus sequentially in a meaningful order, then its working fine only for first 2 items in HorizontalPager and even though I have more than 2 items in my HorizontalPager its not moving accessibility focus properly after 2nd item.

I tried to swipe item manually on its click event using below code--

onItemClicked = { coroutineScope.launch{ pagerState.animateScrollToPage(it) } }

this code properly moving user to the next page but its not setting the accessibility focus to the currently visible card, I tried setting the focus manually using below Modifier properties but still not working--

.focusRequester(requester) .focusable()

Please let me know in case you need any more details to understand the problem.

Upvotes: 1

Views: 494

Answers (1)

It seems that the issue you are having is reported here and has been fixed here, released in Compose Foundation 1.7.0-alpha06.

I have the same problem, hoping that things will work as expected after the fix!

Upvotes: 0

Related Questions