Skip to content

Sketch of VoiceOver SwiftUI previews#213

Draft
DavidBrunow wants to merge 1 commit intocashapp:mainfrom
DavidBrunow:feature/accessibilityPreview
Draft

Sketch of VoiceOver SwiftUI previews#213
DavidBrunow wants to merge 1 commit intocashapp:mainfrom
DavidBrunow:feature/accessibilityPreview

Conversation

@DavidBrunow
Copy link
Contributor

This pull request is a sketch of what VoiceOver SwiftUI previews could look like.

Here are some decisions I made in this implementation:

  • Created a modifier that could be added on top of an existing preview so multiple previews were not needed. This means that a button must be pressed, or a binding must be set to true, to see the VoiceOver preview
  • Used the existing AccessibilitySnapshotView, including the snapshot of the content, rather than rendering the bounding boxes on top of the existing view
  • Placed the legend below the view that has been snapshotted

Here is a screen recording of the preview in action:

Screen.Recording.2024-03-10.at.20.14.43.mov

@@ -0,0 +1,21 @@
Pod::Spec.new do |s|
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to create a new podspec to be able to import AccessibilitySnapshotCore into the code files with the previews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments