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

Unified Diff: chrome/browser/resources/print_preview/previewarea/margin_control.js

Issue 601083004: Enable a11y audit for chrome://print and fix failing tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Debugging Failures 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/previewarea/margin_control.js
diff --git a/chrome/browser/resources/print_preview/previewarea/margin_control.js b/chrome/browser/resources/print_preview/previewarea/margin_control.js
index 7ec2527e7a17e02389387adba3c9c806b7ec8b3d..63f67aeb62639bba7706b935cf88450ff823f9ee 100644
--- a/chrome/browser/resources/print_preview/previewarea/margin_control.js
+++ b/chrome/browser/resources/print_preview/previewarea/margin_control.js
@@ -187,6 +187,7 @@ cr.define('print_preview', function() {
/** @param {boolean} isVisible Whether the margin control is visible. */
setIsVisible: function(isVisible) {
this.getElement().classList.toggle('invisible', !isVisible);
+ this.getElement().setAttribute('aria-hidden', !isVisible);
},
/** @return {boolean} Whether the margin control is in an error state. */
@@ -324,10 +325,6 @@ cr.define('print_preview', function() {
this.tracker.add(
this.getElement(), 'mousedown', this.onMouseDown_.bind(this));
this.tracker.add(
- this.getElement(),
- 'webkitTransitionEnd',
- this.onWebkitTransitionEnd_.bind(this));
- this.tracker.add(
this.textbox_, 'input', this.onTextboxInput_.bind(this));
this.tracker.add(
this.textbox_, 'keydown', this.onTextboxKeyDown_.bind(this));
@@ -371,18 +368,6 @@ cr.define('print_preview', function() {
},
/**
- * Called when opacity CSS transition ends.
- * @private
- */
- onWebkitTransitionEnd_: function(event) {
Dan Beam 2014/10/15 21:37:31 not lgtm, add back before you land https://code.go
hcarmona 2014/10/17 01:35:53 Acknowledged.
- if (event.propertyName != 'opacity')
- return;
- var elStyle = window.getComputedStyle(this.getElement());
- var opacity = parseInt(elStyle.getPropertyValue('opacity'), 10);
- this.textbox_.setAttribute('aria-hidden', opacity == 0);
- },
-
- /**
* Called when textbox content changes. Starts text change timeout.
* @private
*/

Powered by Google App Engine
This is Rietveld 408576698