Posts

Post not yet marked as solved
1 Replies
1.9k Views
I have a screen with a vertical scrolling tableview that contains 100s of items. We group the rows into different sections. For some reason we don't utilize viewForHeaderInSection but we fake the apperance of a section by styling a UITableViewCell. From the tableView's perspective everything is a tableViewCell with no sections (we only have 1 section for the entire tableView). We have two different kind of cells. one for the fake section and another for the regular item. I have added the .header property to accessibilityTraits on the tableViewCell that's for the section and it works sometimes. The issue i'm running into is that if the section cell is not visible on-screen, i can't jump from one header to next header using the VoiceOver rotor. I have tried few different things but it simply refuses to jump from one 'section' to another unless both 'sections' are visible on screen. I also tried creating a real viewForHeaderInSection and returning them to rule out the possibility that it's because the cells are not drawn on-screen. That didn't help. The behavior I'm trying to achieve is done on the Settings app Notifications. There both NOTIFICATION STYLE and GOVERNMENT ALERTS are headers and i can jump between them (even though neither are visible at the same time). When i jump between them, it automatically scrolls the tableview which is what i'm hoping to achieve in my app. Does anyone have any idea?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.6k Views
Our app has a UISearchBar as part of a UINavigationItem's titleView.The element layout looks like this: Window (Main), 0x600001ab6060, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab6140, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5ea0, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5f80, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5ce0, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5dc0, {{0.0, 0.0}, {414.0, 896.0}} Other, 0x600001ab5b20, {{0.0, 0.0}, {414.0, 896.0}} NavigationBar, 0x600001ab5c00, {{0.0, 44.0}, {414.0, 56.0}}, identifier: 'Search' SearchField, 0x600001ab5960, {{0.0, 44.0}, {414.0, 56.0}}, identifier: 'searchTextField'The SearchField is accessible but sending `typeText` doesn't do anything. It prints this error on console. t = 82.89s Failed: Neither element nor any descendant has keyboard focus. Event dispatch snapshot: SearchField, identifier: 'searchTextField'The keyboard is open before sending typeText so i've no idea what's going on here. I tried using the Record feature to see what Apple does. Taping the Search bar with Record button causes it to crash with errorTimestamped Event Matching Error: Failed to find matching elementThe implementation looks like this navigationController?.navigationBar.isAccessibilityElement = false navigationItem.isAccessibilityElement = false searchBar.isAccessibilityElement = true searchBar.accessibilityIdentifier = "searchTextField" searchBar.accessibilityTraits = [.searchField] navigationItem.titleView = searchBar
Posted Last updated
.