From 704a4ffd9042eaf212951d4533db3997c6586fea Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 30 Nov 2011 23:17:19 +0000 Subject: [PATCH] * (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 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. --- includes/SkinTemplate.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 504c39392f..c56bd6f8d6 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -441,7 +441,9 @@ class SkinTemplate extends Skin { 'text' => ( $wgContLang->getLanguageName( $nt->getInterwiki() ) != '' ? $wgContLang->getLanguageName( $nt->getInterwiki() ) : $l ), 'title' => $nt->getText(), - 'class' => $class + 'class' => $class, + 'lang' => $nt->getInterwiki(), + 'hreflang' => $nt->getInterwiki(), ); } } -- 2.20.1