Conversation
New types: - `AccessibilityRenderer` enum (.uikit, .swiftui) for selecting render backend - `ColorPalette` with .legacy and .modern presets, unified UIColor/SwiftUI Color API - `LegendLayoutMetrics` shared layout constants for UIKit and SwiftUI renderers - `AccessibilitySnapshotBaseView` abstract base class for snapshot views Changes to existing Core files: - `AccessibilitySnapshotConfiguration` defaults to empty color array (palette handles fallback) - `OverlayView` accepts separate fill/stroke colors from palette - `LegendView` accepts fill color from palette - `AccessibilitySnapshotView` uses ColorPalette for color management - Deprecate `MarkerColors.defaultColors` in favor of `ColorPalette.legacy` Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete SwiftUI-based accessibility snapshot renderer: View Components: - `SwiftUIAccessibilitySnapshotView` - Main container for SwiftUI content - `SwiftUIAccessibilitySnapshotContainerView` - UIKit wrapper for hosting - `ElementView` - Overlay marker and shape rendering - `ActivationPointView` - Crosshairs for activation points - `DescriptionView` / `HintView` - Text content display Legend Components: - `SwiftUILegendView` - Multi-column legend layout - `LegendEntryView` - Individual legend entry with marker and content - `TraitsView` - Unspoken traits as pills (incl. supportsZoom) - `CustomActionsView` / `CustomContentView` / `CustomRotorsView` - `UserInputLabelsView` - Voice Control input labels Layout Primitives: - `PillFlowLayout` - Horizontal flow with wrapping - `ColumnWrapLayout` - Multi-column balanced layout Styling: - `SwiftUIDesignTokens` - Centralized styling constants Parser: - Add `rotorResultLimit` support for custom rotor parsing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
FBSnapshotTestCase extensions: - Add `renderer` parameter to `SnapshotVerifyAccessibility` functions - Default to `.uikit` for backwards compatibility - SwiftUI views can now specify `.swiftui` renderer - Update `markerColors` defaults to use ColorPalette SnapshotTesting extensions: - Add `renderer` parameter to accessibility snapshot strategies - Maintain existing API with default UIKit renderer Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Package.swift: - Add SwiftUI_Experimental library target - Add SwiftUI_Experimental dependency to iOSSnapshotTestCase Example/Project.swift (Tuist): - Add SwiftUI_Experimental framework target - Add SwiftUIExperimentalDemo app target (iOS 18.0+) - Add SwiftUIExperimentalTests test target (iOS 18.0+) - Add SwiftUIExperimentalDemo scheme with test action - FBSnapshotTestCase_Accessibility depends on SwiftUI_Experimental - AccessibilitySnapshotDemo depends on SwiftUI_Experimental Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SwiftUIExperimentalDemo app: - BasicAccessibilityDemo - Labels, values, hints, adjustable elements - FormElementsDemo - Buttons, toggles, sliders, pickers, text fields - CustomActionsDemo - Custom accessibility actions - ContainersDemo - Data tables, list/landmark containers - RotorsDemo - Custom accessibility rotors with search - ColorPaletteDemo - Modern/legacy palette comparison - InputLabelsDemo - Voice Control input labels - SortPriorityDemo - Accessibility sort priority SwiftUIExperimentalTests: - SwiftUIExperimentalTestCase - Base class with device validation - SwiftUIRendererTests - Snapshot tests for all demo views AccessibilitySnapshotDemo: - UnspokenTraitsDemoView - SwiftUI view showing unspoken traits Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reference images for SwiftUIExperimentalTests on: - iOS 18.5 (402x874 @3x) - iOS 26.2 (402x874 @3x) Tests covered: - testBasicAccessibilityDemo - testContainersDemo - testCustomActionsDemo - testCustomRotorsDemo - testInputLabelsDemo - testSortPriorityDemo Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename AccessibilityRenderer enum to LayoutEngine - Rename renderer: parameter to layoutEngine: in public APIs - Rename cleanUpPreviousOverlays() to cleanup() - Rename createOverlays(with:) to render(data:) - Remove verbose AI-style comments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This completes the 2x2 matrix of layout engines × comparison libraries: | | FBSnapshotTestCase | SnapshotTesting | |--------------------|-------------------|-----------------| | UIKit Layout | ✅ Works | ✅ Works | | SwiftUI Layout | ✅ Works | ✅ Works (NEW) | Changes: - Add SwiftUI_Experimental dependency to AccessibilitySnapshot target - Add layoutEngine parameter to .accessibilityImage() strategy - Make LayoutEngine.default mutable for global configuration - Consolidate SwiftUI Experimental demos from 7 to 4 - Lower SwiftUI_Experimental to iOS 16.0 Usage: ```swift // Per-test override assertSnapshot(of: view, as: .accessibilityImage(layoutEngine: .swiftui)) // Global default LayoutEngine.default = .swiftui assertSnapshot(of: view, as: .accessibilityImage()) ``` Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cherry-picked from RoyalPineapple/swiftui-ui-iteration. Changed availability from iOS 18 to iOS 16 to match project requirements. Removed 26.0.1 test device config (not used in CI). Original commit: effd1dc
- Rename module: SwiftUI_Experimental → AccessibilitySnapshotPreviews - Rename demo app: SwiftUIExperimentalDemo → AccessibilitySnapshotPreviewsDemo - Rename tests: SwiftUIExperimentalTests → AccessibilitySnapshotPreviewsTests - Update Package.swift and Project.swift - Update all imports
Update reference images with new test class naming and correct iOS 26.2 screen size (440x956 for iPhone 16 Pro Max). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just checking any CI issues