Adds a lang attribute to <h1 id="firstHeading">.
Interface language is applied to <html> and content language is
applied to <div id="mw-content-text">. This leaves firstHeading
with the interface language, which is wrong in general. It
also causes incorrect display of the title for languages that
have custom line-height.
This patch is based on code written by Munirathnam M at
the Bangalore DevCamp (he couldn't submit it because of network
issues). It looks OK to me, but it's my first time doing anything
with $this->data in a skin, so please correct me if I'm wrong.
Change-Id: I55dd392dbf0d4f768344b66e6ceb3a023b1d5c9b
* (bug 41706) EditPage: Preloaded page should be converted if possible and needed.
* (bug 41886) Rowspans are no longer exploded by tablesorter until the table is
actually sorted.
+* (bug 2865) User interface HTML elements don't use lang attribute
+ (completed the fix by adding the lang attribute to firstHeading)
=== API changes in 1.21 ===
* prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt
?>
<!-- heading -->
- <div id="mw_header"><h1 id="firstHeading"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
+ <div id="mw_header"><h1 id="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
<div id="mw_main">
<div id="mw_contentwrapper">
<a id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
- <h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html('title') ?></span></h1>
+ <h1 id="firstHeading" class="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html('title') ?></span></h1>
<div id="bodyContent" class="mw-body">
<div id="siteSub"><?php $this->msg('tagline') ?></div>
<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
<!-- /sitenotice -->
<?php endif; ?>
<!-- firstHeading -->
- <h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
+ <h1 id="firstHeading" class="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
<!-- /firstHeading -->
<!-- bodyContent -->
<div id="bodyContent">