Page MenuHomePhabricator

Ability to dynamically change base font-size of Mediawiki
Open, LowPublic

Description

We (@pl.wiki) have loads of reports that say "FONT SIZE IS TO SMALL!!!" (yes in capitals ;-)) and sometimes quite opposite that font size is too big. I'm aware that some reports might be made because of different renderings in different browsers (like in bug 23956), still it seems that problems like that should be resolved differently.

We try to educate people that they can zoom in/out pages in their browsers (or change DPI), but I think a more appropriate solution would be to add some "A+", "A-" buttons to make fonts bigger and smaller through JavaScript. Script could add some class to body (or #content) that would change the size and set a cookie to preserve the state (e.g. for 10 days). In e-newspapers there are usually 3 to 5 sizes of fonts. Three state version is kinda easier to do from an interface perspective as there could be 3 letters "A" with gradual size.

One more thing - we could do it with JavaScript alone, but I think the class should be added on server side so that fonts wouldn't flicker upon loading a page.

See Also:

Details

Reference
bz24739

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:06 PM
bzimport set Reference to bz24739.
bzimport added a subscriber: Unknown Object (MLST).

Wikimedia is about spreading free knowledge, and our users will benefit from knowing that they can change the size of the fonts from their browser, isn't it?

Facebook seems also to be doing well and they also don't offer any hint in their UI - see e.g. http://www.geeksugar.com/How-Change-Facebook-Font-Size-11876255

I never liked those font size gadgets in UI and I personally think that we shouldn't be doing them. Especially not in our official skins / engine. If someone wants this there is probably a way to have it via gadget.

There is code available: [[User:Edokter/FontSizer.js]] / [[User:Edokter/FontSizer.css]]. Should be trivial to make into a gadget.

It's not possible to do this with a gadget (at least not possible to do this nicely), because it's not possible to run JavaScript before the page is rendered (IIRC not possible after 1.17).

Besides I think this should be available for all users of all wikis. Yes, there are people that know how to use their browser as a tool, but most people don't know about it's existence and so don't know about it's functions. Thats probably because most browsers hide their UI more and more (IE 10 on Win8 even hides it completely).

I think this is a great start to an idea. However I hate to spend design and development cycles redesigning browser functionality.

  1. My recommendation would be to have the default site skin react properly during browser font zoom
  1. Create a Beta Feature https://www.mediawiki.org/wiki/Beta_Features that allows someone to switch to an accessiblity mode where we have significanlty larger fonts by default
  1. Have the site be responsive to window size when it comes to line length, leading, padding & whitespace, (but not font size )which will all aid in readability.
  • Bug 58690 has been marked as a duplicate of this bug. ***

This is still being requested, after the April 2014 Typography Refresh work.

(In reply to Nux from comment #4)

It's not possible to do this with a gadget (at least not possible to do this
nicely), because it's not possible to run JavaScript before the page is
rendered (IIRC not possible after 1.17).

It is now, with the top directive.

TheDJ set Security to None.