I'm trying to do grouping of my button with my label but not getting the rectangle for accessibility at right place.
After swiping all the way to get to the element, it takes right width and height but y-position is completely wrong. It speaks the right VO but I don't know why position is incorrect. I have following code,
let checkboxAccessible = UIAccessibilityElement(accessibilityContainer: view)
let unionRect = passwordCheckbox.frame.union(showPasswordText.frame)
checkboxAccessible.accessibilityFrame = UIAccessibilityConvertFrameToScreenCoordinates(unionRect, self.view)
checkboxAccessible.accessibilityLabel = NSLocalizedString("Show Password", comment: "showPasswordText")
view.accessibilityElements = [productTitle, leadInText, emailTextField, passwordTextField, checkboxAccessible, loginButton, forgotPasswordView, helpButton]
Any help will be appreciated.