JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.89k stars 1.15k forks source link

Compose Multiplatform VoiceOver only works with AccessibilitySyncOptions.Always #4401

Open rschattauer opened 6 months ago

rschattauer commented 6 months ago

Describe the bug I want to test VoiceOver with iOS target, but it only seems to work when I configure my ComposeUIViewController with AccessibilitySyncOptions.Always which, when pressing the button spams the output voice drastically.

Affected platforms

Versions

To Reproduce Steps and/or the code snippet to reproduce the behavior:

  1. Create a project from the wizard: kmp.jetbrains.com
  2. Launch on iOS Simulator and open Accessibility Inspector
  3. Not able to navigate around with Left/Right VoiceOver movement commands
  4. When changing accessibilitySyncOptions within ComposeUIViewController configuration to AccessibilitySyncOptions.Always navigating works, but clicking the button spams B..B..B..B..B..B..B..Button..
rschattauer commented 6 months ago

Two videos, one with Always and one with WhenRequiredByAccessibilityServices set as AccessibilitySyncOptions

https://github.com/JetBrains/compose-multiplatform/assets/135036836/0d3db59d-de84-4e35-b9b8-27ab103e90bd https://github.com/JetBrains/compose-multiplatform/assets/135036836/0e1393bd-b7e9-4b99-af31-22c5a68ea944

elijah-semyonov commented 6 months ago

It's not a bug per se, because currently to avoid accessibility related overhead the syncing only runs when VoiceOver is on. Technically it's not on on a simulator, so accessibility tree is empty.

The behavior of Accessibility Inspector is... surprising. I can't reproduce it on a real device though.

okushnikov commented 2 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.