Recover from duplicate accessibility deferral receivers#620
Merged
robmaceachern merged 2 commits intoJun 17, 2026
Conversation
RoyalPineapple
approved these changes
Jun 17, 2026
johnnewman-square
approved these changes
Jun 17, 2026
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.
Summary
Fixes the duplicate accessibility deferral receiver recovery path so it clears deferred content without triggering a DEBUG assertion. This matches the existing recovery behavior while avoiding the crash seen when integrating Blueprint 6.7.2 downstream.
Also wires
BlueprintUIAccessibilityCoreTestsintoPackage.swift, so the accessibility core regression tests run through the package scheme.Root Cause
AccessibilityDeferral.ParentContaineralready had recovery logic for multiple receivers, but it calledassertionFailurefirst. In DEBUG builds, that turned the recoverable duplicate-receiver state into a fatal test crash for consumers such as squareup/ios-register#153221.Validation
xcodebuild test -scheme BlueprintUI-Package -destination 'id=C4028877-CBF8-4816-88AD-B9C88E490FB1' -only-testing:BlueprintUIAccessibilityCoreTests/AccessibilityDeferralTests/test_parentContainerWithDuplicateReceiversClearsDeferralContentxcodebuild test -scheme BlueprintUI-Package -destination 'id=C4028877-CBF8-4816-88AD-B9C88E490FB1' -only-testing:BlueprintUIAccessibilityCoreTestsmise x -- swiftformat --lint .I also ran the full
BlueprintUI-Packagesuite locally. The new accessibility core target and main Blueprint tests passed, but the full run still exited failing on unrelatedBlueprintUICommonControlsTestssnapshot reference gaps for local iOS 18 output and one existing measurement expectation.