mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-30889 calendar: Adding Aria-attributes to make event popup more accessible"
This commit is contained in:
parent
62caadafe5
commit
7df3ea154f
3 changed files with 26 additions and 8 deletions
9
calendar/yui/eventmanager/eventmanager.js
vendored
9
calendar/yui/eventmanager/eventmanager.js
vendored
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue