Accessibility permission corrupted AXWebArea not found

I have an application that uses Accessibility APIs to determine if a browser tab with website content is present by checking for the AXWebArea role element. However, some users have reported that the app is not working after a recent update. When I check for permission using the following code, the result is YES, but the app still cannot detect the AXWebArea element in the browser though other elements like AXButton were there:

    NSDictionary *options = @{(__bridge id)kAXTrustedCheckOptionPrompt : @YES};
    NSLog(@“%d”, AXIsProcessTrustedWithOptions((__bridge CFDictionaryRef)options));

The issue is resolved when the app is removed and re-added to the Accessibility permissions list in the System settings. I would appreciate a detailed explanation of what could be causing this issue.

I have found the issue. It was happening because Chrome Accessibility was disabled for native and web accessibilty. It can be enabled from chrome://accessibility.

Accessibility permission corrupted AXWebArea not found
 
 
Q