Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Issue 101193002: Send AX focus changed events for modal dialog open/close (Closed)

Created:
7 years ago by falken
Modified:
7 years ago
Reviewers:
dmazzoni, eseidel
CC:
blink-reviews, dglazkov+blink, dmazzoni, eae+blinkwatch, adamk+blink_chromium.org, aboxhall, dominicc (has gone to gerrit)
Visibility:
Public.

Description

Send AX focus changed events for modal dialog open/close Otherwise, accessibility technology doesn't interact well with modal <dialog>. For example, JAWS would continue navigating through inert content after a modal is opened. This patch makes the following changes: 1) Call AXObjectCache::handleFocusedUIElementChanged from inertSubtreesChanged. This is necessary because a focus event for some AX object id may have been queued up and became invalid after throwing away the AX tree. 2) Call AXObjectCache::handleFocusedUIElementChanged in Document::setFocusedElement even if m_focusedElement is null. This is necessary because we set m_focusedElement to null when a modal dialog opens, removing focus from the previous focused element in CheckFocusedElementTask. 3) When AXObjectCache is about to send a focus changed event on the docment, send one for the active modal dialog instead. This is a bit of a workaround until the HTML spec bug for dialogs and focus is resolved (http://crbug.com/298079). It's necessary because JAWS seems to ignore the focus event if it is for the document, for the purpose of refreshing the AT tree. No test because a layout test won't be able to test what AX events are sent by Chrome. BUG=324401, 304779

Patch Set 1 #

Patch Set 2 : refactoring #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -10 lines) Patch
M Source/core/accessibility/AXObjectCache.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/accessibility/AXObjectCache.cpp View 1 3 chunks +12 lines, -6 lines 3 comments Download
M Source/core/dom/Document.cpp View 1 1 chunk +2 lines, -2 lines 2 comments Download
M Source/core/html/HTMLDialogElement.cpp View 1 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
falken
dmazzoni@, could you please review? I also saw your comment about firing an event on ...
7 years ago (2013-12-03 08:57:39 UTC) #1
falken
On 2013/12/03 08:57:39, falken wrote: > dmazzoni@, could you please review? > > I also ...
7 years ago (2013-12-03 09:26:13 UTC) #2
dmazzoni
https://codereview.chromium.org/101193002/diff/20001/Source/core/accessibility/AXObjectCache.cpp File Source/core/accessibility/AXObjectCache.cpp (right): https://codereview.chromium.org/101193002/diff/20001/Source/core/accessibility/AXObjectCache.cpp#newcode171 Source/core/accessibility/AXObjectCache.cpp:171: // If a modal dialog is active, let it ...
7 years ago (2013-12-10 08:07:53 UTC) #3
falken
Thanks for the review! I looked more closely at how it's changing focus event behavior ...
7 years ago (2013-12-10 12:19:57 UTC) #4
dmazzoni
On Tue, Dec 10, 2013 at 4:19 AM, <falken@chromium.org> wrote: > Thanks for the review! ...
7 years ago (2013-12-10 15:15:02 UTC) #5
eseidel
FYI, I'm also working on splitting FocusController in issue 102033007. That has little bearing on ...
7 years ago (2013-12-10 17:04:29 UTC) #6
falken
On 2013/12/10 15:15:02, Dominic Mazzoni wrote: > On Tue, Dec 10, 2013 at 4:19 AM, ...
7 years ago (2013-12-11 03:56:46 UTC) #7
falken
7 years ago (2013-12-12 07:58:01 UTC) #8
On 2013/12/11 03:56:46, falken wrote:
> BUT, Hixie just updated the spec: http://html5.org/r/8338
> 
> Now the first control in the dialog gets focus, if nothing was autofocused. So
> suddenly this focus forcing is for the rare case where a dialog has no
focusable
> controls. I'm going to try to implement the new spec change and see if I can
get
> it working well for NVDA. 

Let me pursue the new focusing steps at:
https://codereview.chromium.org/112553002/

This way we don't need to force a focus event, it just happens, ignoring the
rare
case of a modal dialog with no focusable elements.

Powered by Google App Engine
This is Rietveld 408576698