-
Notifications
You must be signed in to change notification settings - Fork 84
SwiftUI TextEditor bounding box does not render properly #202
Copy link
Copy link
Open
Labels
P1: High PriorityIssues that would result in incorrectly accessing whether or not a view is accessible.Issues that would result in incorrectly accessing whether or not a view is accessible.Switch Control parityMismatch between output of framework and actual Switch Control behaviorMismatch between output of framework and actual Switch Control behaviorVoice Control parityMismatch between output of framework and actual Voice Control behaviorMismatch between output of framework and actual Voice Control behaviorVoiceOver parityMismatch between output of framework and actual VoiceOver behaviorMismatch between output of framework and actual VoiceOver behaviorbugSomething isn't working as expectedSomething isn't working as expected
Description
Given this snapshot test:
@available(iOS 14.0, *)
func testTextEditor() {
let textEditor = TextEditor(text: .constant(""))
.frame(
width: UIScreen.main.bounds.width,
height: UIScreen.main.bounds.height
)
.border(Color.black)
assertSnapshot(
matching: textEditor,
as: .accessibilityImage,
named: nameForDevice()
)
}The library renders this snapshot where the accessibility bounding box does not match the text editor's frame (note that the missing description for the Text Field is being worked in #186):

This misrendering does not occur if the text editor is wrapped in a UIHostingController before calling assertSnapshot.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1: High PriorityIssues that would result in incorrectly accessing whether or not a view is accessible.Issues that would result in incorrectly accessing whether or not a view is accessible.Switch Control parityMismatch between output of framework and actual Switch Control behaviorMismatch between output of framework and actual Switch Control behaviorVoice Control parityMismatch between output of framework and actual Voice Control behaviorMismatch between output of framework and actual Voice Control behaviorVoiceOver parityMismatch between output of framework and actual VoiceOver behaviorMismatch between output of framework and actual VoiceOver behaviorbugSomething isn't working as expectedSomething isn't working as expected