diff --git a/lib/javascript-static.js b/lib/javascript-static.js index e5597698ee3..4cbbefceee5 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -610,7 +610,7 @@ M.util.init_block_hider = function(Y, config) { .setAttrs({ alt: config.tooltipVisible, src: this.get('iconVisible'), - tabindex: 0, + tabIndex: 0, 'title': config.tooltipVisible }); hide.on('keypress', this.updateStateKey, this, true); @@ -621,7 +621,7 @@ M.util.init_block_hider = function(Y, config) { .setAttrs({ alt: config.tooltipHidden, src: this.get('iconHidden'), - tabindex: 0, + tabIndex: 0, 'title': config.tooltipHidden }); show.on('keypress', this.updateStateKey, this, false); @@ -634,8 +634,10 @@ M.util.init_block_hider = function(Y, config) { M.util.set_user_preference(this.get('preference'), hide); if (hide) { this.get('block').addClass('hidden'); + this.get('block').one('.block-hider-show').focus(); } else { this.get('block').removeClass('hidden'); + this.get('block').one('.block-hider-hide').focus(); } }, updateStateKey : function(e, hide) {