-
Notifications
You must be signed in to change notification settings - Fork 332
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
Compose Multiplatform on iOS doesn't have the proper accessibility hierarchy #1549
Comments
@GuilhE Have you managed to get |
Looks like the accessibility indexes can be interacted with when |
Hello @bartekpacia demo.mp4If I run maestro studio on Android simulator I can select them. If you want to try use this. |
Thanks for sharing this video, it's very helpful. I see the problem now. It seems that Compose is for some reason not doing good job at accessibility. Does the same problem occur on Android? |
On Android, same composables, are selectable. |
Thanks. Labeling it as iOS-only. If you're up to that, I'd also like to ask you to report this issue to the Compose repo. This looks like a problem on their side. You can attach output of I see in your repo that you're using the latest dev build of Compose: v1.7.0-dev1721. So accessibility should work fine, but it doesn't. |
How is the view hierarchy implemented on the Maestro side? I'm unsure if this should be considered a bug from Maestro or CMP, as I expect the output to differ across platforms. On Android, there's the View system, which isn't present on iOS, web and desktop. Should Maestro perhaps adjust its approach regarding layout scanning? 🤔 Maestro also fails to detect Web Apps made in CMP (Wasm): I consider this a feature request an not a bug, but perhaps I'm wrong. Compose Multiplatform outside Android is not detected on Maestro. |
It's using UIAutomator for Android, and XCUITest for iOS. It shouldn't matter if your app is built with native iOS/Android framework, or Compose Multiplatform, or anything different. As long as your app has accessibility, Maestro will (or should) query that. I think the video you showed here is a great demo of the problem and would make a good issue on JetBrains issue tracker for Compose Multiplatform. |
I can do it, no problem 😊, but it might be more effective if you did it, since you have more knowledge about the intricacies of Maestro to better answer incoming questions. You can use the resources I've shared here. |
I'd be so grateful if you did it! There's a lot of stuff going on in our issue tracker, every help is much appreciated:) |
The take way is, to use Maestro to inspect Compose Multiplatform on iOS, we have 2 options: 1 - if using physical devices, turn on VoiceOver. import androidx.compose.runtime.ExperimentalComposeApi
import androidx.compose.ui.platform.AccessibilitySyncOptions
import androidx.compose.ui.window.ComposeUIViewController
import platform.UIKit.UIViewController
import com.example.example.YourApp
@OptIn(ExperimentalComposeApi::class)
@Suppress("FunctionNaming")
fun MainViewController(): UIViewController {
return ComposeUIViewController(
configure = { accessibilitySyncOptions = AccessibilitySyncOptions.Always(null) },
content = { YourApp() }
)
} demo.mp4 |
In version
|
Is your feature request related to a problem? Please describe.
Adding support for Compose Multiplatform would be a valuable enhancement, especially considering JetBrains's significant investment in it.
Describe the solution you'd like
Same functionality we have when using Jetpack Compose and Swift UI:
Additional context
You can test it by running my sample and compare the time it takes to evaluate for instance:
assertVisible: Stand by
tapOn: point: 50%,81%
(the simulator gets the command but the Studio does not stream)using Maestro Studio on Swift UI and Compose screen with an iOS Simulator.
I'm also experiencing random crashs when navigating between screens when Maestro Studio is connected with the iOS Simulator:
To replicate:
When the Maestro Studio is not connected it will not crash.
The text was updated successfully, but these errors were encountered: