Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-37668 Accessibility: Help popup should be easy to close using key…

…board
  • Loading branch information...
commit 9fb8d1f275643e2198b76921da924b1f74cb6f97 1 parent 9130843
@sammarshallou sammarshallou authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/javascript-static.js
View
12 lib/javascript-static.js
@@ -1464,7 +1464,7 @@ M.util.help_icon = {
});
this.overlay.render(Y.one(document.body));
- footerbtn.on('click', this.overlay.hide, this.overlay);
+ footerbtn.on('click', this.close, this);
var boundingBox = this.overlay.get("boundingBox");
@@ -1525,8 +1525,14 @@ M.util.help_icon = {
},
display_callback : function(content) {
- content = '<div role="alert">' + content + '</div>';
- this.overlay.set('bodyContent', content);
+ var contentnode, heading;
+ contentnode = Y.Node.create('<div role="alert">' + content + '</div>');
+ this.overlay.set('bodyContent', contentnode);
+ heading = contentnode.one('h1');
+ if (heading) {
+ heading.set('tabIndex', 0);
+ heading.focus();
+ }
},
hideContent : function() {
Please sign in to comment.
Something went wrong with that request. Please try again.