Open yonaskolb opened 1 year ago
Hi @yonaskolb, thanks for reporting this! Can you provide a code sample that reproduces this issue? Additionally, what iOS version are you testing on?
Thanks for the quick reply @NickEntin. Example project showing the issue attached. I'm using iOS 16.4 in Xcode 14.3
SnapshotExample.zip
The example also highlights a different issue with the rendering of forms, which there is an unresolved issue for in SnapshotTesting https://github.com/pointfreeco/swift-snapshot-testing/issues/667
If using drawHierarchyInKeyWindow: true
in the example that issue is fixed but the rendering is offset incorrectly. Don't want to confuse the issue, just wanted to mention that too in case you're wondering why the snapshot looks weird.
Any updates on this one?
I haven't had a chance to test on Xcode 14.3 yet, but on Xcode 13.3 it seems to be behaving correctly. I'll dig in further this week.
Still working on this one. There was definitely a change in iOS 16 that we're not currently handling properly. Looking at sample view you provided, in iOS 15 it's backed by a table view and in iOS 16 it's backed by a collection view.
It looks like with collection views it's using an accessibility container with a single element view (that's not an accessibility element) which then has subviews that are themselves accessibility containers each with a single element. Somewhere in this nesting we don't order things the same as VoiceOver.
The order of parsed accessibility markers is in the wrong order. See screenshot, where the section headings are parsed as being at the bottom of the view. This is a SwiftUI view with no animations. Is there a workaround for this? The order is important to me as I use the accessibility markers to create a markdown representation of the view.