TableView UI in a weird state when VoiceOver is enabled.

Originator:tej007
Number:rdar://7670606 Date Originated:2020-04-20
Status:open Resolved:
Product:Accessibility Product Version:
Classification: Reproducible:Yes
 
A test project to reproduce the bug can be found at: https://github.com/advantej/VoiceOverBug

The following steps were performed on a iPhone X, iOS 13.2

1. Run the VoiceOverBug application and observe that there is one cell with a red background color in a table view which has a green background color (see screenshots at: https://github.com/advantej/VoiceOverBug/blob/master/README.md)
2. Turn on voice over
3. With the accessibility focus on the cell, swipe left. The cell disappears from the view hierarchy. (Red view is gone.) Confirm this in the view hierarchy debugger. (see screenshots at https://github.com/advantej/VoiceOverBug/blob/master/README.md)
4. Sometimes a combination of left/right swipes are needed to reproduce the issue.

When the issue is observed, the following assertion is seen in the debugger:

```
2020-04-20 12:00:48.490943-0700 VoiceOverBug[1959:1403324] [AXCommon] *** Assertion failure in -[NSObject(AXPrivCategory) _accessibilitySearchSubtreesAfterChildElement:direction:searchType:allowOutOfBoundsChild:range:shouldScrollToVisible:], NSObjectAccessibility.m:8722: We should always have been able to find the index of the child[<UITableView: 0x103858600; frame = (0 44; 375 734); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x283ae1620>; layer = <CALayer: 0x28349dae0>; contentOffset: {0, -993}; contentSize: {375, 1350}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <VoiceOverBug.ViewController: 0x102c0b990>>] element if we had one to begin with <VoiceOverBug.MyTableViewCell: 0x102b112c0; baseClass = UITableViewCell; frame = (0 0; 375 1350); clipsToBounds = YES; hidden = YES; autoresize = W; layer = <CALayer: 0x2834b2b80>>
```

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!