From 40ebfaeefd0940049ce2ef6e481546d90f19b9af Mon Sep 17 00:00:00 2001 From: Brian Barnes Date: Wed, 2 Jul 2014 16:22:26 +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 76b0c834387..5b51cdf52c4 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']); -- 2.43.0