[TYPO3-core] RFC: #4133 / accesskey for TMENU

Wolfgang Klinger wolfgang at stufenlos.net
Wed Sep 6 22:09:05 CEST 2006


 *hiya!*

 This is a patch request (trunk).
 Bugtracker: http://bugs.typo3.org/view.php?id=4133

 Problem: no automatic handling of the "accesskey" attribute for TMENU
 objects

 Solution: the attached patch

 TODO: add option to TMENU object documentation


 tia, bye
 Wolfgang

-------------- next part --------------
Index: typo3/sysext/cms/tslib/class.tslib_menu.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_menu.php (revision 1722)
+++ typo3/sysext/cms/tslib/class.tslib_menu.php (working copy)
@@ -1578,12 +1578,19 @@
                                $this->I['pid'] = $this->menuArr[$key]['pid'];
                                $this->I['spacer'] = $this->menuArr[$key]['isSpacer'];

+                                       // Set access key
+                               if ($this->mconf['accessKey'])  {
+                                       $this->I['accessKey'] = $this->accessKey($this->I['title']);
+                               } else {
+                                       $this->I['accessKey']=Array();
+                               }
+
                                        // Make link tag
                                $this->I['val']['ATagParams'] = $this->WMcObj->getATagParams($this->I['val'], 0);
                                $this->I['linkHREF'] =  $this->link($key,$this->I['val']['altTarget'],$this->mconf['forceTypeValue']);

                                        // Title attribute of links:
-                               $titleAttrValue = $this->WMcObj->stdWrap($this->I['val']['ATagTitle'],$this->I['val']['ATagTitle.']);
+                               $titleAttrValue = $this->WMcObj->stdWrap($this->I['val']['ATagTitle'],$this->I['val']['ATagTitle.']).$this->I['accessKey']['alt'];
                                if (strlen($titleAttrValue))    {
                                        $this->I['linkHREF']['title'] = $titleAttrValue;
                                }


More information about the TYPO3-team-core mailing list