mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Follow up for MDL-12256, "Course AJAX has very poor accessibility - ALT text" - IE tooltip/ title hack.
This commit is contained in:
parent
488bc5f51b
commit
5cfea9fbae
2 changed files with 15 additions and 1 deletions
|
@ -161,7 +161,11 @@ main_class.prototype.mk_button = function(tag, imgSrc, text, attributes, imgAttr
|
|||
|
||||
if (attributes != null) {
|
||||
for (var c=0; c<attributes.length; c++) {
|
||||
container.setAttribute(attributes[c][0], attributes[c][1]);
|
||||
if (attributes[c][0] == 'title' && this.is_ie()) {
|
||||
image.setAttribute(attributes[c][0], attributes[c][1]); //IE hack: transfer 'title'.
|
||||
} else {
|
||||
container.setAttribute(attributes[c][0], attributes[c][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (imgAttributes != null) {
|
||||
|
@ -233,6 +237,14 @@ main_class.prototype.getString = function(identifier, variable) {
|
|||
}
|
||||
}
|
||||
|
||||
main_class.prototype.is_ie = function() {
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
if ((agent.indexOf('msie') != -1)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var main = new main_class();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue