Last modified: 2013-10-31 16:56:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 54453 - Don't override site authors' styles by using inline style in UniversalLanguageSelector
Don't override site authors' styles by using inline style in UniversalLanguag...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UniversalLanguageSelector (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Santhosh Thottingal
:
Depends on:
Blocks: 367
  Show dependency treegraph
 
Reported: 2013-09-22 17:45 UTC by Michael Zajac
Modified: 2013-10-31 16:56 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael Zajac 2013-09-22 17:45:29 UTC
The ULS specifies fonts by injecting inline style sheets into the DOM. 

This overrides site style sheets, takes control away from site authors and administrators, as well as readers, including those using accessibility technology, and encourages authors to use the harmful !important CSS keyword.

An example of the problem: on en.wiktionary there is a mature framework of classes used to set fonts by script code, alongside the use of HTML lang attributes. The ULS randomly interferes with this. 

For example, in the page Fraktur, a passage of text is specified as <span class="Latf" lang="de"> to set it in a Fraktur font. The class .Latf applies font-family: UnifrakturMaguntia, a web font that is *provided by the ULS.*

The ULS adds a style="font-family: sans-serif;" which would be needless otherwise, but in en.Wiktionary overrides the authors’ CSS which resides in MediaWiki:Common.css

  https://en.wiktionary.org/wiki/Fraktur#German
  https://en.wiktionary.org/wiki/MediaWiki:Common.css

How are authors supposed to reliably specify correct fonts? How are authors supposed to specify web fonts provided by the ULS? Why are fonts specified with inline CSS, which robs all control from authors? Why is German-language text specifically formatted as sans-serif?

The ULS should operate using the standard framework of lang attributes, classes, and style sheets instead of inline CSS, providing authors, editors, readers, and users of accessibility technology with several avenues to control or override its behaviour.
Comment 1 Michael Zajac 2013-09-22 17:51:13 UTC
Related:

Bug 39992 - ULS: Don't set inline "font-family: sans-serif" when no fonts are specified
Comment 2 Michael Zajac 2013-09-22 18:07:59 UTC
Demo of the bug at https://en.wiktionary.org/wiki/User:Mzajac/ULS
Comment 3 Santhosh Thottingal 2013-09-24 06:43:14 UTC
By design, ULS tries to give priority to user custom font styles. It is supposed to apply inline font only when no such styles exist. In this specific case, it is not respected and I confirm the bug. This is a regression from https://github.com/wikimedia/jquery.webfonts/commit/39e3851ca1e17e7e9d5968b0af1a0523abf87060 and I am working on it. Thanks.

(For record, this is the same commit cause this bug too: https://bugzilla.wikimedia.org/show_bug.cgi?id=53734)
Comment 4 Dmitri Smirnov 2013-10-26 21:33:42 UTC
Template lang creates bad effect: it shows a different sort of font that looks much bigger that other text around it. It was not like this about two months ago.
Here is only one an example (but there are thousands like this):

https://ru.wikisource.org/wiki/%D0%A2%D0%A1%D0%94/%D0%90%D0%B4%D0%B0%D0%BC

~~~~
Comment 5 Santhosh Thottingal 2013-10-31 08:41:10 UTC
@Michael Zajac, can you confirm https://en.wiktionary.org/wiki/User:Mzajac/ULS is rendering correctly?
Comment 6 Michael Zajac 2013-10-31 14:21:23 UTC
Looks good.
Comment 7 Dmitri Smirnov 2013-10-31 16:56:20 UTC
Yes, now it is OK. Thanks!!! ~~~~

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links