I have a toolbar with a button and an NSView with a titled box. When the window opens and Voice Over is on, I want the focus to be on the titled box. Currently it’s on the toolbar button, because it’s probably higher in accessibility hierarchy. What should I do to have a focus on the box, instead on button?
Thanks
The solution was to access the window accessibility hierarchy in
windowDidLoadlike this:After that the element that is supposed to be first in hierarchy should be found in
windowElementsarray. Say we found it and its index isfirstElIndexthen:Finally we override
windowElementchildren attribute with new array, where the element we want the focus to be on will be at the first place.This is the example for a very simple case. But this is the way to go.