-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fix issue where text entry do not have "text field" or a hint in the description #186
Fix issue where text entry do not have "text field" or a hint in the description #186
Conversation
5eb3b40
to
c3eb5d0
Compare
Sources/AccessibilitySnapshot/Core/Swift/Classes/UIAccessibility+SnapshotAdditions.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NickEntin FYI this is what I'm getting from VoiceOver on iOS 17.3.
e751385
to
391cdd0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bounding box for the TextEditor
looks off -- on device the element is directly below the last text field and on the leading edge of the screen. If possible I'd like to look into that issue separately from the other issue being resolved in this effort.
391cdd0
to
8485578
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, thanks for working on this!
...le/SnapshotTests/__Snapshots__/SnapshotTestingTests/testSwiftUITextEntry.393x852-16-4-3x.png
Outdated
Show resolved
Hide resolved
Sources/AccessibilitySnapshot/Core/Swift/Classes/UIAccessibility+SnapshotAdditions.swift
Show resolved
Hide resolved
Sources/AccessibilitySnapshot/Core/Swift/Classes/UIAccessibility+SnapshotAdditions.swift
Outdated
Show resolved
Hide resolved
661f3a0
to
34dc851
Compare
Example/SnapshotTests/__Snapshots__/SnapshotTestingTests/testUIKitTextView.393x852-16-4-3x.png
Outdated
Show resolved
Hide resolved
@NickEntin do you need anything from me on this? I want to make sure I'm not blocking anything 😄 |
@DavidBrunow Apologies, been a hectic couple weeks. I'll go ahead and update the snapshot images for you. |
Ahh looks like the snapshots are flaky cause of the cursor flashing. I think we need to figure out #15 before we land this one. 😕 |
Not a problem and I'm not trying to add pressure, just wanted to make sure there wasn't more I could do 😄 |
I think if you rebase this on main the builds should pass now 🤞 |
Co-authored-by: Nick Entin <[email protected]>
…be updated from CI)
1c5a779
to
c9a6305
Compare
This is done. |
Actually I'm going to wait on this since you've mentioned needing to capture them on build machines in the past. Let me know if I need to take any action on this. |
Ahh yeah, let me pull the images from the CI jobs and update it now. I don't think the iOS 16 job should have failed, so maybe a different problem... 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I guess this sort of worked in iOS 14, then regressed in later versions. 🤷♂️
All checks have passed ✅ 🎉 |
} | ||
applyVerticalSubviewDistribution(distributionSpecifiers) | ||
|
||
textViewWithText.accessibilityFrame = textViewWithText.frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this necessary to fix an issue? This should be the default value.
In any case, accessibilityFrame
is defined in the screen coordinate space while the frame
is defined in the superview's coordinate space. In a full screen presentation this should generally match, but isn't always the case. We should do the coordinate space conversion here (if we need to keep it):
textViewWithText.accessibilityFrame = textViewWithText.frame | |
textViewWithText.accessibilityFrame = UIAccessibility.convertToScreenCoordinates( | |
textViewWithText.frame, | |
in: self | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied this over from the previous implementation in #58. I don't see why it would be needed. I'll remove it and see if there are negative side effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed that line.
Thanks David, this looks great! I'll do one final pass to make sure we're good to merge. One last thing: have you signed the contributor license agreement? |
I have not, working on that now. |
FYI I will not get this done tonight, checking with folks at work to ensure there are no issues. |
@NickEntin I have signed the contributor license agreement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for working through this @DavidBrunow! Really glad to see this fixed.
Fixes #57. Takes over from #58.