this.isCancelButtonEnabled = isEnabled;
},
+ get isPrintButtonEnabled() {
+ return !this.getChildElement('button.print').disabled;
+ },
+
set isPrintButtonEnabled(isEnabled) {
this.isPrintButtonEnabled_ = isEnabled;
this.updatePrintButtonEnabledState_();
},
/** @override */
+ decorateInternal: function() {
+ cr.ui.reverseButtonStrips(this.getElement());
+ },
+
+ /** @override */
enterDocument: function() {
print_preview.Component.prototype.enterDocument.call(this);
}
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);
},
/**