MDL-53548 Accessibility: Block show/hide keyboard access broken

This commit is contained in:
sam marshall
2016-03-18 13:49:04 +00:00
parent 389ba35049
commit af22f8a159
+4 -2
View File
@@ -608,7 +608,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);
@@ -619,7 +619,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);
@@ -632,8 +632,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) {