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

This commit is contained in:
sam marshall 2016-03-18 13:44:50 +00:00
parent fed66ad9e2
commit f3474e2216

View File

@ -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) {