Skip to content

test(swiftui): add UI adapter and accessibility conformance for A2UISwiftUI - #3587

Closed
gspencergoog wants to merge 2 commits into
test/flutter-adapter-conformancefrom
test/swiftui-adapter-conformance
Closed

gspencergoog wants to merge 2 commits into
test/flutter-adapter-conformancefrom
test/swiftui-adapter-conformance

Conversation

@gspencergoog

Copy link
Copy Markdown
Collaborator

Summary

Add declarative UI framework adapter conformance (conformance/core/adapter_conformance.yaml) and accessibility conformance (conformance/core/accessibility.yaml) coverage for A2UISwiftUI (swift/swiftui).

What Changed

  • SwiftUI Adapter & Accessibility Refinements: Updated Surface.swift, A2UIAccessibilityModifier.swift, A2UITextField.swift, and A2UIButton.swift in swift/swiftui/Sources/ to support NodeResolver view tree resolution (resolved, pending, unknown-type, cyclic) with UNKNOWN_COMPONENT_TYPE and CYCLIC_REFERENCE error emission, user-activation gating on local function invocation, ValidationResult error vs warning control disabling, and unmount() subscription cleanup.
  • SwiftUI Conformance Harness: Added Yams to A2UISwiftUITests dependencies in root Package.swift and created swift/swiftui/Tests/A2UISwiftUITests/AdapterConformanceTests.swift executing all 6 cases of conformance/core/accessibility.yaml and all 13 cases of conformance/core/adapter_conformance.yaml.

Testing

  • swift package describe && swift build --target A2UIJSONTests
  • Verified swiftc -parse across all modified and new .swift files (full A2UISwiftUITests run on macOS CI via swift_build_and_test.yml).

🤖 Agent-generated

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several accessibility enhancements, lifecycle management APIs, and validation support to the SwiftUI adapter, along with a comprehensive suite of adapter and accessibility conformance tests. The review feedback highlights a critical runtime casting issue in Surface.swift that bypasses user activation checks, suggests simplifying the catalog lookup logic, recommends checking for explicit disabled states in A2UIButton, and advises against using #filePath for loading test fixtures to ensure compatibility with sandboxed environments.

@gspencergoog
gspencergoog force-pushed the test/swiftui-adapter-conformance branch from 23c9660 to 735b27c Compare October 23, 2026 23:56
@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from f2b7622 to 6e8e62e Compare October 23, 2026 23:56
@gspencergoog
gspencergoog force-pushed the test/swiftui-adapter-conformance branch from 735b27c to 96aed2f Compare October 27, 2026 15:58
@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from 6e8e62e to 010a25e Compare October 27, 2026 15:58
@gspencergoog
gspencergoog removed this pull request from stack #3588 October 27, 2026 16:00
@gspencergoog
gspencergoog added this pull request to stack #3654 October 27, 2026 16:00
@gspencergoog
gspencergoog force-pushed the test/swiftui-adapter-conformance branch from 96aed2f to b9b2b0e Compare October 27, 2026 16:02
@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from 010a25e to 272ad43 Compare October 27, 2026 16:02
@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from 272ad43 to ad6b9c3 Compare October 27, 2026 16:24
@gspencergoog
gspencergoog force-pushed the test/swiftui-adapter-conformance branch from b9b2b0e to 65758c8 Compare October 27, 2026 16:24
@gspencergoog
gspencergoog removed this pull request from stack #3654 October 27, 2026 17:10
@gspencergoog

Copy link
Copy Markdown
Collaborator Author

Consolidated into #3583, which now carries the shared suites and the adapter and accessibility conformance work for all five renderers (web, Flutter, SwiftUI). The commits and the resolved review threads from this PR are preserved there.

🤖 Agent-generated

gspencergoog added a commit to gspencergoog/A2UI that referenced this pull request Oct 27, 2026
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