From 14eafe4d89056b6a5bd383f15c2ca1de647f1d4e Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 13 Oct 2005 18:21:10 -0400
Subject: [PATCH] Fixed bug #1325050; added alt-texts for IE

---
 program/include/main.inc |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/program/include/main.inc b/program/include/main.inc
index 2e5be7b..1c413bb 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -671,7 +671,7 @@
 // create and register a button
 function rcube_button($attrib)
   {
-  global $CONFIG, $OUTPUT, $JS_OBJECT_NAME;
+  global $CONFIG, $OUTPUT, $JS_OBJECT_NAME, $BROWSER;
   static $sa_buttons = array();
   static $s_button_count = 100;
   
@@ -728,7 +728,14 @@
 
   if ($attrib['alt'])
     $attrib['alt'] = rep_specialchars_output(rcube_label($attrib['alt']));
-    
+
+  // set title to alt attribute for IE browsers
+  if ($BROWSER['ie'] && $attrib['title'] && !$attrib['alt'])
+    {
+    $attrib['alt'] = $attrib['title'];
+    unset($attrib['title']);
+    }
+
   // add empty alt attribute for XHTML compatibility
   if (!isset($attrib['alt']))
     $attrib['alt'] = '';

--
Gitblit v1.9.1