From c7e90e3f2f3b7cddce01cc73132e2a168b3b696a Mon Sep 17 00:00:00 2001
From: Anika Henke <anika@selfthinker.org>
Date: Sat, 15 Oct 2011 17:30:51 +0100
Subject: [PATCH] show accesskey also on actionlink title and add accesskey
 parameter only if a key is defined (FS#2226)

---
 inc/template.php | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/inc/template.php b/inc/template.php
index b56d6c718..f98385adb 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -480,10 +480,15 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){
             $linktarget = wl($id, $params);
         }
         $caption = $lang['btn_' . $type];
+        $akey = $addTitle = '';
+        if($accesskey){
+            $akey = 'accesskey="'.$accesskey.'" ';
+            $addTitle = ' ['.strtoupper($accesskey).']';
+        }
         $out = tpl_link($linktarget, $pre.(($inner)?$inner:$caption).$suf,
                         'class="action ' . $type . '" ' .
-                        'accesskey="' . $accesskey . '" rel="nofollow" ' .
-                        'title="' . hsc($caption) . '"', 1);
+                        $akey . 'rel="nofollow" ' .
+                        'title="' . hsc($caption).$addTitle . '"', 1);
     }
     if ($return) return $out;
     echo $out;
-- 
GitLab