Fix initial accessibility of symbol pop-up

VoiceOver reads an AXValue for a pop-up button - that is the selected
item. But button's title does not set an AXValue, as it probably is
not a menu item. So change the code set to the title by setting a
single menu item with that title.

This fixes accessibility of the pop-up when accessing its value before
it is first popped up. It makes the code consistent with setGrammarName:
which works fine (that's how I discovered how to fix it).
This commit is contained in:
Boris Dušek
2013-03-02 18:28:03 +01:00
committed by Allan Odgaard
parent baf2839299
commit 21c70057b4

View File

@@ -263,7 +263,8 @@ static NSImageView* OakCreateImageView (NSImage* image)
if(_symbolName == newSymbolName || [_symbolName isEqualToString:newSymbolName])
return;
_symbolName = newSymbolName;
self.symbolPopUp.title = newSymbolName ?: @"Symbols";;
[self.symbolPopUp.menu removeAllItems];
[self.symbolPopUp addItemWithTitle:newSymbolName ?: @"Symbols"];
}
- (void)setRecordingTimer:(NSTimer*)aTimer