MDL-30889 calendar: Adding Aria-attributes to make event popup more accessible"

This commit is contained in:
Ankit Agarwal 2012-09-17 11:28:05 +08:00
parent 62caadafe5
commit 7df3ea154f
3 changed files with 26 additions and 8 deletions

View file

@ -49,7 +49,10 @@ YUI.add('moodle-calendar-eventmanager', function(Y) {
});
panel.render(td);
panel.get('boundingBox').addClass('calendar-event-panel');
panel.get('boundingBox').setAttribute('aria-live', 'off');
this.on('showevent', panel.show, panel);
this.on('showevent', this.setAriashow, panel);
this.on('hideevent', this.setAriahide, panel);
this.on('hideevent', panel.hide, panel);
}
},
@ -63,6 +66,12 @@ YUI.add('moodle-calendar-eventmanager', function(Y) {
cancelShow : function() {
clearTimeout(this.get(SHOWTIMEOUT));
},
setAriashow : function() {
this.get('boundingBox').setAttribute('aria-live', 'assertive');
},
setAriahide : function() {
this.get('boundingBox').setAttribute('aria-live', 'off');
},
show : function() {
this.initPanel();
this.fire('showevent');