Permalink
Browse files

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

This reverts commit 956ec41.
  • Loading branch information...
danpoltawski committed Jul 16, 2014
1 parent d613a0d commit 3e65f72a40cb913bba5c0c1a5f47e11267ff15ca
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 3e65f72

Please sign in to comment.