UITabBarItem accessibilityIdentifier not work iOS 15.4 XCode 13.2.1

Hi I have a problem with these identifiers

I applied it like this to the tabbar

self.tabBar.accessibilityIdentifier = @"MyID";

and works!!!


But for tabBarItem I've tried everything but it doesn't work it's always empty

Called in viewDidLoad of my TabbarController

self.tabBarItem.isAccessibilityElement = YES;
[self.tabBarItem setIsAccessibilityElement:YES];

self.tabBarItem.accessibilityIdentifier = @"MyID";
self.tabBar.items[0].accessibilityIdentifier = @"MyID";

Nothing works. I always get empty


Do you have any idea on how to implement the identifier I want for each single element of the tabbar?

Thanks

Try setting the values on the root controller of each tab item and not the tab item itself.

Hi @mobileTen, already done, in every single controller. In the viewDidLoad of each tabbar root controller. but nothing

@n3o999 Did you ever find a solution for this problem? I am currently having the same issue (tabbarItems viewIdentifier not present but tabbar viewIdentifier is present) but on tvOS. It seems to set it after forcing an action on the simulator.

UITabBarItem accessibilityIdentifier not work iOS 15.4 XCode 13.2.1
 
 
Q