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

Incorrect sort order for SwiftUI Form in iOS 16 #129

Open
yonaskolb opened this issue May 24, 2023 · 7 comments
Open

Incorrect sort order for SwiftUI Form in iOS 16 #129

yonaskolb opened this issue May 24, 2023 · 7 comments
Labels
bug Something isn't working as expected P1: High Priority Issues that would result in incorrectly accessing whether or not a view is accessible. VoiceOver parity Mismatch between output of framework and actual VoiceOver behavior

Comments

@yonaskolb
Copy link

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.

testExample MainA11y

@NickEntin
Copy link
Collaborator

Hi @yonaskolb, thanks for reporting this! Can you provide a code sample that reproduces this issue? Additionally, what iOS version are you testing on?

@NickEntin NickEntin added bug Something isn't working as expected VoiceOver parity Mismatch between output of framework and actual VoiceOver behavior P1: High Priority Issues that would result in incorrectly accessing whether or not a view is accessible. labels May 24, 2023
@yonaskolb
Copy link
Author

Thanks for the quick reply @NickEntin. Example project showing the issue attached. I'm using iOS 16.4 in Xcode 14.3
SnapshotExample.zip
testExample Form

@yonaskolb
Copy link
Author

yonaskolb commented May 24, 2023

The example also highlights a different issue with the rendering of forms, which there is an unresolved issue for in SnapshotTesting pointfreeco/swift-snapshot-testing#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.

testExample Form

@yonaskolb
Copy link
Author

Any updates on this one?

@NickEntin
Copy link
Collaborator

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.

@NickEntin
Copy link
Collaborator

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.

iOS 15 iOS 16

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.

@NickEntin NickEntin changed the title Incorrect sort order Incorrect sort order for SwiftUI Form in iOS 16 Sep 28, 2023
@yonaskolb
Copy link
Author

Fixed by #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected P1: High Priority Issues that would result in incorrectly accessing whether or not a view is accessible. VoiceOver parity Mismatch between output of framework and actual VoiceOver behavior
Projects
None yet
Development

No branches or pull requests

2 participants