Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #558: Improve on accessibility for Spotlight #597

Conversation

vladcipariu91
Copy link
Collaborator

@vladcipariu91 vladcipariu91 commented Sep 15, 2023

Description

Issue ticket
Issue 1:
I made a minor improvement to accessibility by adding semantic actions.
This UX is not ideal. For it to work properly I assume we need to get hold of a callback from TalkBack or semantics that tells us which item is currently selected and when the user performs another swipe gesture. Based on the swipe gestures direction we'll need to call the right function on the spotlight next() or previous().

Issue 2:
Fixed

I've attached a video:

ezgif.com-resize.mov

Check list

  • I have updated CHANGELOG.md if required.
  • I have updated documentation if required.

customActions =
if (elementIndex == activeIndex) {
listOfNotNull(
CustomAccessibilityAction("Next") {
Copy link
Collaborator

@CherryPerry CherryPerry Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not localised.

Also can you use non-custom actions that are used in androidx.compose.HorizontalPager?

https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/Pager.kt;l=726?q=androidx.compose.foundation.pager&sq=&ss=androidxpageUp { } & pageDown { } on SampleChildren

https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/pager/LazyLayoutSemanticState.kt;l=44CollectionInfo (you are already using it)

IDK how to make it focus the scrolled page (on your video it does not focus on it). probably somewhere in sources too. Please compare TalkBack behaviour to the default HorizontalPager.

Potentially SpotlightModel should be able to provide Modifier.semantics to both parent and each children.

@vladcipariu91 vladcipariu91 changed the title improves on accessibility for spotlight Improve on accessibility for spotlight Sep 18, 2023
@vladcipariu91 vladcipariu91 self-assigned this Sep 18, 2023
@vladcipariu91 vladcipariu91 changed the title Improve on accessibility for spotlight Improve on accessibility for Spotlight Sep 18, 2023
@vladcipariu91 vladcipariu91 changed the title Improve on accessibility for Spotlight Issue #558: Improve on accessibility for Spotlight Sep 18, 2023
@zsoltk zsoltk assigned marekpdev and unassigned vladcipariu91 Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants