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

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

Issue 582123002: Port live region ChromeVox tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromevox_keyboard_tests_again
Patch Set: Created 6 years, 3 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
Index: chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
index c8a8a1792df8b67c6e0be4e8edf1c11440409154..11e469898db788c9bfc4a79729d94eac2a1f7214 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
@@ -344,16 +344,18 @@ cvox.LiveRegions.announceChange = function(
}
var navDescriptions = cvox.LiveRegions.getNavDescriptionsRecursive(node);
- if (navDescriptions.length == 0) {
- return;
- }
-
if (isRemoval) {
+ navDescriptions = [cvox.DescriptionUtil.getDescriptionFromAncestors(
Peter Lundblad 2014/09/19 08:14:58 Can you mention this change to production code in
dmazzoni 2014/09/22 07:14:55 Done.
+ [node], true, cvox.ChromeVox.verbosity)];
navDescriptions = [new cvox.NavDescription({
context: cvox.ChromeVox.msgs.getMsg('live_regions_removed'), text: ''
})].concat(navDescriptions);
}
+ if (navDescriptions.length == 0) {
+ return;
+ }
+
// Don't announce alerts on page load if their text and values consist of
// just whitespace.
var deltaTime = new Date() - cvox.LiveRegions.pageLoadTime;

Powered by Google App Engine
This is Rietveld 408576698