mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-68353 core: Set aria-label for close buttons on YUI dialogues
This commit is contained in:
parent
68fd8d8bdf
commit
1b4acd4f3f
@ -127,8 +127,10 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
var bb;
|
||||
|
||||
if (this.get('closeButton') !== false) {
|
||||
// The buttons constructor does not allow custom attributes
|
||||
this.get('buttons').header[0].setAttribute('title', this.get('closeButtonTitle'));
|
||||
var title = this.get('closeButtonTitle');
|
||||
// The buttons constructor does not allow custom attributes.
|
||||
this.get('buttons').header[0].setAttribute('title', title);
|
||||
this.get('buttons').header[0].setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
// Initialise the element cache.
|
||||
|
File diff suppressed because one or more lines are too long
@ -127,8 +127,10 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
var bb;
|
||||
|
||||
if (this.get('closeButton') !== false) {
|
||||
// The buttons constructor does not allow custom attributes
|
||||
this.get('buttons').header[0].setAttribute('title', this.get('closeButtonTitle'));
|
||||
var title = this.get('closeButtonTitle');
|
||||
// The buttons constructor does not allow custom attributes.
|
||||
this.get('buttons').header[0].setAttribute('title', title);
|
||||
this.get('buttons').header[0].setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
// Initialise the element cache.
|
||||
|
6
lib/yui/src/notification/js/dialogue.js
vendored
6
lib/yui/src/notification/js/dialogue.js
vendored
@ -97,8 +97,10 @@ Y.extend(DIALOGUE, Y.Panel, {
|
||||
var bb;
|
||||
|
||||
if (this.get('closeButton') !== false) {
|
||||
// The buttons constructor does not allow custom attributes
|
||||
this.get('buttons').header[0].setAttribute('title', this.get('closeButtonTitle'));
|
||||
var title = this.get('closeButtonTitle');
|
||||
// The buttons constructor does not allow custom attributes.
|
||||
this.get('buttons').header[0].setAttribute('title', title);
|
||||
this.get('buttons').header[0].setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
// Initialise the element cache.
|
||||
|
Loading…
x
Reference in New Issue
Block a user