Permalink
Browse files

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

This reverts commit b440662.
  • Loading branch information...
danpoltawski committed Jul 16, 2014
1 parent c82fa0c commit e9b7ea41c4007ee9f83b7dff1d19a7d120a65ddf
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/outputcomponents.php
View
@@ -510,8 +510,9 @@ public function __construct($pix, $alt, $component='moodle', array $attributes =
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']);

0 comments on commit e9b7ea4

Please sign in to comment.