r104778 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104777‎ | r104778 | r104779 >
Date:23:17, 30 November 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 4901) lang, hreflang attributes added to sidebar interlanguage links

The lang attribute assists screen readers in reading out the language name correctly; see sample recordings from iOS's VoiceOver reader mode attached on <https://bugzilla.wikimedia.org/show_bug.cgi?id=4901&gt;
hreflang attribute is less clearly useful, but may assist some tools in indicating the language of the destination site.

Inline interwiki links have not been changed.

Release notes will be added on 1.18 channel, this is an old bug fix and easy to backport.
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -441,7 +441,9 @@
442442 'text' => ( $wgContLang->getLanguageName( $nt->getInterwiki() ) != '' ?
443443 $wgContLang->getLanguageName( $nt->getInterwiki() ) : $l ),
444444 'title' => $nt->getText(),
445 - 'class' => $class
 445+ 'class' => $class,
 446+ 'lang' => $nt->getInterwiki(),
 447+ 'hreflang' => $nt->getInterwiki(),
446448 );
447449 }
448450 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r104781MFT r104778: fix for sidebar portion of bug 4901; fixes language names in scr...brion23:20, 30 November 2011
r104783MFT r104778: fix for sidebar portion of bug 4901; fixes language names in scr...brion23:23, 30 November 2011

Status & tagging log