Don't use summary attribute in TOCs
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 10 Aug 2009 01:42:45 +0000 (01:42 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 10 Aug 2009 01:42:45 +0000 (01:42 +0000)
The summary attribute is obsolete in HTML 5.  It wasn't serving any
useful purpose anyway, since it duplicated the h2 inside the table.  (Of
course, we should really stop using <table> for TOCs altogether!)

RELEASE-NOTES
includes/Linker.php

index 2cacdc2..c311be2 100644 (file)
@@ -196,6 +196,8 @@ this. Was used when mwEmbed was going to be an extension.
    cutting-edge browsers.  E.g., some inputs will be autofocused, users will
    not be allowed to submit forms with certain types of invalid values (like
    numbers outside the permitted ranges), etc.
+** The summary attribute has been removed from tables of contents.  summary is
+   obsolete in HTML 5 and wasn't useful here anyway.
 * New hook SpecialRandomBeforeSQL allows extensions to modify or replace the SQL
   query used in Special:Random and subclasses, deprecating the $wgExtraRandompageSQL
   config variable
index bcd23a7..bd306ce 100644 (file)
@@ -1260,7 +1260,7 @@ class Linker {
                global $wgJsMimeType;
                $title = wfMsgHtml('toc') ;
                return
-                  '<table id="toc" class="toc" summary="' . $title .'"><tr><td>'
+                  '<table id="toc" class="toc"><tr><td>'
                 . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
                 . $toc
                 # no trailing newline, script should not be wrapped in a