MDL-31976 Accessbility: Action icons on course page do not need title attributes

This commit is contained in:
Frederic Massart 2012-09-11 14:53:15 +08:00
parent a3ab18c735
commit aad982aa24
5 changed files with 22 additions and 27 deletions

View file

@ -550,6 +550,10 @@ class pix_icon implements renderable {
}
if (!isset($this->attributes['title'])) {
$this->attributes['title'] = $this->attributes['alt'];
} else if (empty($this->attributes['title'])) {
// Remove the title attribute if empty, we probably want to use the parent node's title
// and some browsers might overwrite it with an empty title.
unset($this->attributes['title']);
}
}
}

View file

@ -36,8 +36,7 @@ YUI.add('moodle-core-dragdrop', function(Y) {
.setStyle('cursor', 'move')
.setAttrs({
'src' : M.util.image_url(MOVEICON.pix, MOVEICON.component),
'alt' : title,
'title' : M.str.moodle.move
'alt' : title
});
if (iconclass) {
dragicon.addClass(iconclass);