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

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

Issue 522433002: Merge text from all changes to the same live region into one utterance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 11e469898db788c9bfc4a79729d94eac2a1f7214..baaa6ae3319c3880f890a611bf6d774651d87222 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/live_regions.js
@@ -412,6 +412,30 @@ cvox.LiveRegions.announceChange = function(
}
});
+ // TODO(dmazzoni): http://crbug.com/415679 Temporary design decision;
+ // until we have a way to tell the speech queue to group the nav
+ // descriptions together, collapse them into one.
+ // Otherwise, one nav description could be spoken, then something unrelated,
+ // then the rest.
+ if (navDescriptions.length > 1) {
+ var allStrings = [];
+ navDescriptions.forEach(function(desc) {
+ if (desc.context) {
+ allStrings.push(desc.context);
+ }
+ if (desc.text) {
+ allStrings.push(desc.text);
+ }
+ if (desc.userValue) {
+ allStrings.push(desc.userValue);
+ }
+ });
+ navDescriptions = [new cvox.NavDescription({
+ text: allStrings.join(', '),
+ category: 'live'
+ })];
+ }
+
handler(assertive, navDescriptions);
};
« 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