Revert "MDL-46226 core: pix_icon no longer sets title to the alt text"

This reverts commit 956ec418c6.
This commit is contained in:
Dan Poltawski
2014-07-16 13:45:35 +01:00
parent d613a0db57
commit 3e65f72a40
+3 -2
View File
@@ -510,8 +510,9 @@ class pix_icon implements renderable {
if (empty($this->attributes['class'])) {
$this->attributes['class'] = 'smallicon';
}
if (empty($this->attributes['title'])) {
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']);