Index: chrome/common/extensions/docs/examples/apps/calculator/app/view.js |
diff --git a/chrome/common/extensions/docs/examples/apps/calculator/app/view.js b/chrome/common/extensions/docs/examples/apps/calculator/app/view.js |
index 375854efff9dc68ec598525f07954bd2c472da3d..a45169f4602f5dc2e0726f36a497f58691fc0917 100644 |
--- a/chrome/common/extensions/docs/examples/apps/calculator/app/view.js |
+++ b/chrome/common/extensions/docs/examples/apps/calculator/app/view.js |
@@ -88,9 +88,13 @@ View.prototype.updateDisplay_ = function(display, values, event) { |
View.prototype.addEquation_ = function(display, values) { |
// The order of the equation children below makes them stack correctly. |
var equation = this.createDiv_(display, 'equation'); |
- equation.appendChild(this.createDiv_(display, 'operand')); |
- equation.appendChild(this.createDiv_(display, 'operator')); |
- equation.appendChild(this.createDiv_(display, 'accumulator')); |
+ var operation = this.createDiv_(display, 'operation'); |
+ operation.appendChild(this.createSpan_(display, 'operator')); |
+ operation.appendChild(this.createSpan_(display, 'operand')); |
+ equation.appendChild(operation); |
+ var accumulator = this.createDiv_(display, 'accumulator'); |
+ accumulator.setAttribute('aria-hidden', 'true'); |
+ equation.appendChild(accumulator); |
this.updateEquation_(equation, values); |
display.appendChild(equation).scrollIntoView(); |
} |
@@ -125,3 +129,10 @@ View.prototype.createDiv_ = function(display, classes) { |
div.setAttribute('class', classes); |
return div; |
} |
+ |
+/** @private */ |
+View.prototype.createSpan_ = function(display, classes) { |
+ var span = display.ownerDocument.createElement('span'); |
+ span.setAttribute('class', classes); |
+ return span; |
+} |