Accessibility Labels on popup buttons in NSPredicateEditor

Hi there! I'm trying to set Accessibility Labels on the popup buttons inside rows in an NSPredicateEditor.

In the NSPredicateEditorRowTemplate subclass I've tried setting the accessibilityLabel property directly, as well as setting it on the id returned by NSAccessibilityUnignoredDescendant() like this:

- (NSArray<NSView *> *)templateViews
{
    NSArray *views = [super templateViews];
   NSPopUpButton *keyPathButton = (NSPopUpButton *)views[0];    
    keyPathButton.accessibilityLabel = NSLocalizedString(@"Filter Options", nil);

    [NSAccessibilityUnignoredDescendant(keyPathButton) setAccessibilityLabel:NSLocalizedString(@"Filter Options", nil)];
    return views;
}

When I check the popup button with Accessibility Inspector I don't see any Label at all. Even trying to add tooltips to the popup buttons fails. Anyone have any tips?

Interesting sidenote: I can successfully set the Accessibility Label on the text field in the -templateViews method, just not the popup buttons.

Thanks!

Accessibility Labels on popup buttons in NSPredicateEditor
 
 
Q