r11940 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11939‎ | r11940 | r11941 >
Date:01:12, 4 December 2005
Author:hashar
Status:old
Tags:
Comment:
* code formatting
* add 'summary' attribute to toc table element (accessibility)
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -784,17 +784,19 @@
785785 /** @todo document */
786786 function tocList($toc) {
787787 global $wgJsMimeType;
788 - return "<table id='toc' class='toc'><tr><td>"
789 - . "<div id='toctitle'><h2>" . wfMsgForContent('toc') . "</h2></div>\n"
790 - . $toc
791 - . "</ul>\n</td></tr></table>\n"
792 - . '<script type="'.$wgJsMimeType.'">'
793 - . ' if (window.showTocToggle) {'
794 - . ' var tocShowText = "' . wfEscapeJsString( wfMsgForContent('showtoc') ) . '";'
795 - . ' var tocHideText = "' . wfEscapeJsString( wfMsgForContent('hidetoc') ) . '";'
796 - . ' showTocToggle();'
797 - . ' } '
798 - . "</script>\n";
 788+ $title = wfMsgForContent('toc') ;
 789+ return
 790+ '<table id="toc" class="toc" summary="' . $title .'"><tr><td>'
 791+ . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
 792+ . $toc
 793+ . "</ul>\n</td></tr></table>\n"
 794+ . '<script type="' . $wgJsMimeType . '">'
 795+ . ' if (window.showTocToggle) {'
 796+ . ' var tocShowText = "' . wfEscapeJsString( wfMsgForContent('showtoc') ) . '";'
 797+ . ' var tocHideText = "' . wfEscapeJsString( wfMsgForContent('hidetoc') ) . '";'
 798+ . ' showTocToggle();'
 799+ . ' } '
 800+ . "</script>\n";
799801 }
800802
801803 /** @todo document */

Status & tagging log