Created attachment 260320 [details] Test file that demonstrates unexpected behavior for calling focus() on div with tabindex=-1 When Voiceover is enabled: Action: calling the javascript focus() method on a div with a tabindex=-1 Expected result: move focus to the div, so that subsequent VO+right arrow would move VO cursor to first child element. Observed result: moves the Voiceover cursor to the first child in the container. Oddly enough, simply putting an aria-label on the div results in the correct behavior: Action: calling the javascript focus() method on a div with a tabindex=-1 and an aria-label="foo" Expected result: moves the Voiceover cursor to the first child in the container. Observed result: expected result. Also notable is the fact that a div with a tabindex=-1 gets an accessibleRole value of Group (see Bug#148646: https://bugs.webkit.org/show_bug.cgi?id=148646) See attached test file for example and steps to reproduce.
<rdar://problem/22507080>
This is expected behavior. As soon as we see an object with "accessibility" attributes, we expose it to the AX hierarchy. if we see none of those attributes, then we'll hide the object to reduce tree bloat