Bug 148647 - AX: VO Focus is not consistent when moved to div with aria-label vs no aria-label
Summary: AX: VO Focus is not consistent when moved to div with aria-label vs no aria-l...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac OS X 10.10
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-31 14:49 PDT by Mark Sadecki
Modified: 2015-09-02 09:41 PDT (History)
2 users (show)

See Also:


Attachments
Test file that demonstrates unexpected behavior for calling focus() on div with tabindex=-1 (2.85 KB, text/html)
2015-08-31 14:49 PDT, Mark Sadecki
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Sadecki 2015-08-31 14:49:26 PDT
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.
Comment 1 Radar WebKit Bug Importer 2015-08-31 14:50:48 PDT
<rdar://problem/22507080>
Comment 2 chris fleizach 2015-09-02 09:41:29 PDT
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