Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftUI TextEditor bounding box does not render properly #202

Open
DavidBrunow opened this issue Jan 26, 2024 · 0 comments
Open

SwiftUI TextEditor bounding box does not render properly #202

DavidBrunow opened this issue Jan 26, 2024 · 0 comments
Labels
bug Something isn't working as expected P1: High Priority Issues that would result in incorrectly accessing whether or not a view is accessible. Switch Control parity Mismatch between output of framework and actual Switch Control behavior Voice Control parity Mismatch between output of framework and actual Voice Control behavior VoiceOver parity Mismatch between output of framework and actual VoiceOver behavior

Comments

@DavidBrunow
Copy link
Contributor

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):
testTextEditor 393x852-16-4-3x

This misrendering does not occur if the text editor is wrapped in a UIHostingController before calling assertSnapshot.

@NickEntin NickEntin added bug Something isn't working as expected VoiceOver parity Mismatch between output of framework and actual VoiceOver behavior P1: High Priority Issues that would result in incorrectly accessing whether or not a view is accessible. Switch Control parity Mismatch between output of framework and actual Switch Control behavior Voice Control parity Mismatch between output of framework and actual Voice Control behavior labels Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected P1: High Priority Issues that would result in incorrectly accessing whether or not a view is accessible. Switch Control parity Mismatch between output of framework and actual Switch Control behavior Voice Control parity Mismatch between output of framework and actual Voice Control behavior VoiceOver parity Mismatch between output of framework and actual VoiceOver behavior
Projects
None yet
Development

No branches or pull requests

2 participants