Page MenuHomePhabricator

class mw-parser-output missing lang attribute on Extension:Popups
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Create a reference on zhwiki
<ref>这是一个参考资料</ref>
  • Hover on the reference

What happens?:
The "mw-parser-output" element missing lang attribute, and the "mwe-popups-extract" element has an incorrect language code "zh-cn".

What should have happened instead?:
Both "mwe-popups-extract" and "mw-parser-output" should have a "lang" attribute with the language code "zh-Hans-CN". If "mw-parser-output" missing lang attribute , TemplateStyles which have the ":lang(zh-Hans-CN)" selector will not work on Extension:Popups.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
https://w.wiki/Ey35

Other information (browser name/version, screenshots, etc.):
HTML after hover on the reference:

<div class="mwe-popups mwe-popups-type-reference mwe-popups-fade-in-down flipped-y mwe-popups-no-image-pointer mwe-popups-is-not-tall" aria-hidden="" style="left: 190.5px; top: auto; bottom: 281px; display: block;">
<div class="mwe-popups-container">
<div class="mwe-popups-extract" lang="zh-cn">
<div class="mwe-popups-scroll">
<strong class="mwe-popups-title">
<span class="popups-icon popups-icon--reference-generic"></span>
参考文献
</strong>
<bdi><div class="mw-parser-output">这是一个参考资料</div></bdi>
</div>
<div class="mwe-popups-fade" style="bottom: 0px; right: 0px;"></div>
</div>
<footer>
<div class="mwe-popups-settings"><a class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only mwe-popups-settings-button" href="/wiki/Special:Preferences#mw-prefsection-rendering"><span class="popups-icon popups-icon--size-small popups-icon--settings"></span><span>更改页面预览设置</span></a></div>
</footer>
</div>
</div>