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

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: Improve comments in chromevox_unittest_base 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions_test.unitjs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
+ [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;
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions_test.unitjs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698