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

Unified Diff: Source/core/html/HTMLDialogElement.cpp

Issue 101193002: Send AX focus changed events for modal dialog open/close (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: refactoring Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLDialogElement.cpp
diff --git a/Source/core/html/HTMLDialogElement.cpp b/Source/core/html/HTMLDialogElement.cpp
index 82496b15abe91cb6fbcc2408c55bf128bd190be7..f4173a4e0b11d7b8b97a0c1e82a308078e2b8f4c 100644
--- a/Source/core/html/HTMLDialogElement.cpp
+++ b/Source/core/html/HTMLDialogElement.cpp
@@ -67,8 +67,13 @@ static void inertSubtreesChanged(Document& document)
// it, though a more clever way is probably possible.
Document* topDocument = document.topDocument();
topDocument->clearAXObjectCache();
- if (AXObjectCache* cache = topDocument->axObjectCache())
+ if (AXObjectCache* cache = topDocument->axObjectCache()) {
cache->childrenChanged(cache->getOrCreate(topDocument));
+ // Screen readers appear to rely on focus to update their trees. Send
+ // one out in case one was queued up before the AX tree was cleared,
+ // rendering it meaningless.
+ cache->handleFocusedUIElementChanged(document);
+ }
}
HTMLDialogElement::HTMLDialogElement(Document& document)
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698