Bug 166670 - AX: Focus should jump into modal dialogs when one appears
Summary: AX: Focus should jump into modal dialogs when one appears
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-01-03 16:55 PST by Nan Wang
Modified: 2017-01-11 12:35 PST (History)
12 users (show)

See Also:


Attachments
patch (11.17 KB, patch)
2017-01-03 17:07 PST, Nan Wang
no flags Details | Formatted Diff | Diff
patch (11.20 KB, patch)
2017-01-03 17:28 PST, Nan Wang
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews112 for mac-elcapitan (1.49 MB, application/zip)
2017-01-03 18:28 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2017-01-03 16:55:21 PST
VO should jump to web dialogs/menus if focus isn't moved (within some timeframe) when one appears. 
This should be limited to modal dialogs. (@aria-modal).

<rdar://problem/16043767>
Comment 1 Nan Wang 2017-01-03 17:07:50 PST
Created attachment 297971 [details]
patch
Comment 2 chris fleizach 2017-01-03 17:21:18 PST
Comment on attachment 297971 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=297971&action=review

> Source/WebCore/ChangeLog:9
> +        author didn't handle the focus movements.

"focus movement."

> LayoutTests/accessibility/mac/aria-modal-auto-focus.html:47
> +        newBtn  = accessibilityController.accessibleElementById("new");

extra space

> LayoutTests/accessibility/mac/aria-modal-auto-focus.html:64
> +                }, 100);

do we have to wait .1s here or can this be faster?

> LayoutTests/accessibility/mac/aria-modal-auto-focus.html:80
> +    if (sh == "show") {

bad indentation
Comment 3 Nan Wang 2017-01-03 17:28:18 PST
Created attachment 297976 [details]
patch

updated from review
Comment 4 Build Bot 2017-01-03 18:28:40 PST
Comment on attachment 297976 [details]
patch

Attachment 297976 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2825563

New failing tests:
imported/w3c/web-platform-tests/IndexedDB/interfaces.worker.html
Comment 5 Build Bot 2017-01-03 18:28:43 PST
Created attachment 297981 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 6 WebKit Commit Bot 2017-01-03 19:07:59 PST
Comment on attachment 297976 [details]
patch

Clearing flags on attachment: 297976

Committed r210265: <http://trac.webkit.org/changeset/210265>
Comment 7 WebKit Commit Bot 2017-01-03 19:08:05 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 valdrinkoshi 2017-01-11 12:35:23 PST
Hi, I faced these issues with the current implementation:
1. if dialog has no children, the focus is not moved to the dialog (it has a valid tabindex, -1 or 0)
2. focus is always moved to the first focusable child, w/o respecting the tab order (e.g. 1st focusable child has tabindex=0, 2nd focusable child has tabindex=1)
3. focus is moved in the dialog only by toggling aria-modal attribute from false to true. I'd expect toggling the visibility of the element would trigger the focus move (e.g. display:none -> display:block)