From b440662be26ae362a5ac5ad4febbb793e8b785ed Mon Sep 17 00:00:00 2001 From: Brian Barnes Date: Wed, 2 Jul 2014 16:59:16 +1200 Subject: [PATCH] MDL-46226 core: pix_icon no longer sets title to the alt text --- lib/outputcomponents.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index a99d460b5af..a61e2337e53 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -510,9 +510,8 @@ class pix_icon implements renderable { if (empty($this->attributes['class'])) { $this->attributes['class'] = 'smallicon'; } - if (!isset($this->attributes['title'])) { - $this->attributes['title'] = $this->attributes['alt']; - } else if (empty($this->attributes['title'])) { + + 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']);