Skip to content

Commit

Permalink
MDL-53548 Accessibility: Block show/hide keyboard access broken
Browse files Browse the repository at this point in the history
  • Loading branch information
sammarshallou committed Mar 18, 2016
1 parent fed66ad commit f3474e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/javascript-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit f3474e2

Please sign in to comment.