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

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js

Issue 841453005: Correctly resolve active descendant when describing change events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Rebase on master... Created 5 years, 11 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js
index 15ce8ebdbb1236668658d60e221ab8ebbad806d8..3a3067cbd7e743cea700c9ea28568a97de64a37c 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/event_watcher.js
@@ -1117,19 +1117,18 @@ cvox.ChromeVoxEventWatcher.handleControlChanged = function(control) {
announceChange = true;
}
+ var activeDescendant = cvox.AriaUtil.getActiveDescendant(control);
if ((parentControl &&
parentControl != control &&
document.activeElement == control)) {
- // If focus has been set on a child of the parent control, we need to
- // sync to that node so that ChromeVox navigation will be in sync with
- // focus navigation.
+ // Sync ChromeVox to the newly selected control.
cvox.ApiImplementation.syncToNode(
- control, true,
+ activeDescendant || control, true,
cvox.ChromeVoxEventWatcher.queueMode_());
announceChange = false;
- } else if (cvox.AriaUtil.getActiveDescendant(control)) {
+ } else if (activeDescendant) {
cvox.ChromeVox.navigationManager.updateSelToArbitraryNode(
- cvox.AriaUtil.getActiveDescendant(control),
+ activeDescendant,
true);
announceChange = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698