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

Unified Diff: chrome/browser/resources/print_preview/print_header.js

Issue 697463002: print preview: more voice feedback issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/print_preview/print_header.js
diff --git a/chrome/browser/resources/print_preview/print_header.js b/chrome/browser/resources/print_preview/print_header.js
index 80a908711e7619c8dd523ba502b09d46bc0aa4b1..cc0895643fa9fe773bc4d2a7dd8f404017b13e7e 100644
--- a/chrome/browser/resources/print_preview/print_header.js
+++ b/chrome/browser/resources/print_preview/print_header.js
@@ -184,21 +184,30 @@ cr.define('print_preview', function() {
}
var html;
+ var label;
if (numPages != numSheets) {
html = loadTimeData.getStringF('printPreviewSummaryFormatLong',
'<b>' + numSheets + '</b>',
'<b>' + summaryLabel + '</b>',
numPages,
pagesLabel);
+ label = loadTimeData.getStringF('printPreviewSummaryFormatLong',
+ numSheets, summaryLabel,
+ numPages, pagesLabel);
} else {
html = loadTimeData.getStringF('printPreviewSummaryFormatShort',
'<b>' + numSheets + '</b>',
'<b>' + summaryLabel + '</b>');
+ label = loadTimeData.getStringF('printPreviewSummaryFormatShort',
+ numSheets, summaryLabel);
}
// Removing extra spaces from within the string.
html = html.replace(/\s{2,}/g, ' ');
- this.getChildElement('.summary').innerHTML = html;
+
+ var summary = this.getChildElement('.summary');
+ summary.innerHTML = html;
+ summary.setAttribute('aria-label', label);
},
/**

Powered by Google App Engine
This is Rietveld 408576698