title: iOS voiceover for custom view displayed over uiviewcontroller
body: <p>I have a UIViewController let's call it MainViewController, a child controller instance (ChildViewController of type UITableViewController) is added to MainViewController 
  the accessibility of the ChildViewController is set and voiceover works fine for the same.</p>
  
  <p>MainViewController has a toolbar button, on tap a custom view will be displayed as shown below</p>
  
  <pre><code>//CustomView class
  func show() {
      UIView.animate(withDuration:0.5, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 5, options: .curveEaseInOut, animations: {
          self.disabledLayer.backgroundColor = UIColor.init(white: 0, alpha: 0.55)
          self.transform = .identity
      }, completion: {
          (value: Bool) in
          self.accessibilityElements = [titleLabel, closeButton] // titleLabel, closeButton are added dynamically to the view and are of type UILabel and UIButton respectively
      })
  }
  </code></pre>
  
  <p>by doing this the voiceover never used to reach(read) the custom view elements. after some research added below line to MainViewController in toolbar button tap handler</p>
  
  <pre><code>UIAccessibility.post(notification: .screenChanged, argument: actionView)
  </code></pre>
  
  <p>after this the voiceover starts reading the elements in the Custom View and can be navigated through elements using left and right swap.</p>
  
  <p>But <strong>the issue</strong> is when i tap on any of the element in the CustomView it is not selected and read, instead the elements of ChildViewController which is in the background is selected and read at that tap position.</p>
  
  <p>On Swap, works as expected</p>
  
  <p><a href="https://i.stack.imgur.com/qCyuF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qCyuF.png" alt="On Swap, works as expected"></a></p>
  
  <p><strong>Issue</strong> - when tapped on close button, the element in the childview controller which is in the background is selected</p>
  
  <p><a href="https://i.stack.imgur.com/vC8U8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vC8U8.png" alt="Issue - when tapped on close button, the element in the childview controller which is in the background is selected"></a></p>
  
  <p>Note: the CustomView has a child view with semi transparent background Color</p>
  
  <p>Thanks in advance</p>