Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,11 @@ extension AccessibilityDeferral {
sources.forEach { $0.accessibilityElementsHidden = false }


// During a reentrant Blueprint update (e.g. a forced layoutBelowIfNeeded mid-update),
// this container can transiently observe both the outgoing and incoming Receiver before
// the hierarchy settles. That isn't a misconfiguration, so we recover and bail; the
// settled layout pass re-runs updateAccessibility() with the single surviving Receiver.
guard receivers.count <= 1 else {
assertionFailure("AccessibilityDeferral.ParentContainer must contain at most one Receiver; found \(receivers.count).")
receivers.forEach { $0.apply(content: nil, frameProvider: nil) }
return
}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `AccessibilityDeferral` no longer aborts debug builds when its container transiently observes more than one `Receiver`. The `assertionFailure` treated more than one `Receiver` as a misconfiguration, but that state became reachable once `BlueprintView` began deferring reentrant updates (#618) instead of crashing on them: a reentrant layout pass can now run while the hierarchy is mid-swap, with the outgoing and incoming `Receiver` both briefly present. Previously that reentrancy tripped `BlueprintView`'s precondition first, so the deferral container never reached this state. The assertion was removed in favor of the existing safe recovery (clearing receiver content and bailing); the settled layout pass re-applies content with the single surviving `Receiver`.

### Added

### Removed
Expand Down
Loading