mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-68353 core: Set aria-label for close buttons on YUI dialogues
This commit is contained in:
parent
68fd8d8bdf
commit
1b4acd4f3f
4 changed files with 14 additions and 8 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue