Page MenuHomePhabricator

[Regression] Users are getting the incorrect default mobile font size
Closed, ResolvedPublic

Description

The change in T349303 has led to some discussion in Discord and en:WP:VPT

@Soda writes: "Based on some initial tests, it seems like the problem here is that people who had previous intentionally set the font to "Regular" (renamed "Standard" now) are now getting a bigger font instead of the "Small" font (which is now the default font)."

Changes made:

  • Anonymous users defaulting to a medium font size will now get the SMALL font size. Note: One of the downsides of this is that users who wanted medium will not get it until cache has cleared.
  • The line height is now relative to the browser font size. This addresses issues where the ascenders were being cut off in certain browsers. This should address issues we saw with crammed line height such as this one: https://twitter.com/iCloud_VII/status/1758552029998313620
  • We'll continue the conversation about concerns relating to the slight change in line height in T357770 next week. Currently there is too much noise from the above two issues to clearly hear people's concerns and evaluate what a suitable response would be.

QA Results - Prod

ACStatusDetails
1T357724#9565442
2T357724#9565442

Event Timeline

@Soda could you share some of the discussions in Discord? You said "the Wikimedia Discord community that this particular change makes the text very hard to read." - specifically what is difficult to read? (I am trying to find the Discord conversation now but without much luck)

https://discord.com/channels/221049808784326656/221060705078476801/1207769970696519710 would be the start of the messages in question. The major criticism is that the paragraphs are too dense and the line spacing is too small.

We are currently discussing our options to fix this matter.
For now I have the current guidance:

Jdlrobson renamed this task from Concerns raised about new mobile font size to Users are getting the incorrect default mobile font size.Feb 16 2024, 12:12 AM

Follow-up on what I said at VPT: was the indentation increase intentional with the previous task?

For now I have the current guidance:

Hi Jon,

I've done this, and while the font size seems about right now (though still different from before?), the line height is still far too small. See attached screenshot, with an old page (left, cached thumbnail) and a new page just after refreshing. Is this the same issue?

IMG_2787D153FED2-1.jpeg (841×1 px, 589 KB)

I also tried logged out in a private window, after purging, and I think I see the same as if I set the font size to "Standard" — again, much larger than it was before, with a too-small line height.

We are currently discussing our options to fix this matter.

Respectfully, please consider rolling back this deployment until you figure it out, as it degrades the experience for a large number of readers. (See Molly's link.)

The rest of my team is out for the day, but we'll talkabout this first thing tomorrow.

Hi @Earwig usually we can revert the original patch but that is not possible here, given this implicates anonymous users who are viewing cached versions of the page. If we reverted right now, than the problem would be far worse - some users would be seeing pages too small and some large and we'd

Regarding line height, the change has been from 26.4px to 24px and the rationale is described in T356339#9510249.

We'll think through the options carefully in the morning. In the mean time I think you can add the following CSS to your user CSS (https://en.wikipedia.org/wiki/Special:MyPage/minerva.css) to restore the old line height:

.mw-body p,
	.content p { line-height: 26.4px !important;} `

@Sdrqaz the indention on talk pages doesn't seem related here - i have created T357742: Discussion tools indentation changed to browser default

Regarding line height, the change has been from 26.4px to 24px and the rationale is described in T356339#9510249.

Thanks. In response to this I did some background research, since my gut reaction to it is still quite negative.

For starters, to be clear — apparent spacing between lines depends on not just CSS line-height but also font x-height, so it's difficult to compare it numerically across fonts. I first tried to look at how other text-heavy mobile sites handle this, but a lot of them (e.g. most news sites, Britannica) use serif fonts with smaller x-heights and therefore can get away with a smaller line height while maintaining readability. (That said, Britannica still uses 1.6.) It's actually somewhat difficult to find text-heavy mobile sites that use a sans-serif font, but here are the first couple I found:

  • CNN: font-size 16px, line-height 26px (1.625)
  • Yahoo: font-size 16px, line-height 26px (1.625) (requires a mobile user agent to be set to get mobile styling, otherwise they use 18px/1.8 on desktop)

So 1.5 is somewhat small. W3C guidelines do allow it, but as a minimum value:

Many people with cognitive disabilities have trouble tracking lines of text when a block of text is single spaced. Providing spacing between 1.5 to 2 allows them to start a new line more easily once they have finished the previous one.

WCAG guidelines similarly state:

Line spacing (leading) is at least space-and-a-half within paragraphs, and paragraph spacing is at least 1.5 times larger than the line spacing.

I don't know. Plenty of non-text-heavy mobile sites use much smaller line-heights, and Apple's typography guidelines have a line-height of 1.3 for iOS body copy. But even directly comparing screenshots of body copy from other sites with the same line-height, they don't "feel" as cramped as this does.

I would also like to note that, when comparing old screenshots to the current layout, the actual information density is in most cases seemingly almost identical (see attached images)- at best you gain a line or so. Considering that numerous users have complained about the change making things difficult to read and creating an accessibility issue, it hardly seems worth it. I have personally found it rather hard to even read the mobile version of the wiki as I find myself constantly ending up on the next line and having to backtrack to actually finish reading the line.

In addition, I would argue that the issue of anonymous users seeing inconsistent font sizing might be the lesser of two evils, considering that this is already happening across the Wiki- take the Main Page on enWiki for example, as the Featured Article and Featured List boxes are using the new font size/spacing, while DYK and In the News are using the old font size/spacing.

image.png (2×1 px, 327 KB)

{F41922645}

Is there a CSS snippet intadmins can instate temporarily so the issue is fixed, at least locally, until a fix is created and propagated, like T356928 last week?

.content p { line-height: 26.4px !important;}

Why do we have px values for line-height ? line-height should always be relative (unitless) should they not ? Otherwise anyone with a non-stardard font (or font size) would risk the text (ascender/descender) getting clipped or cramped.

Set up T357770: Evaluate rationale for line height changes in Minerva to separate the conversation and next steps around the line height from the current bug. Will try to reply to line height questions directly in that ticket.

Change 1004137 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] Mitigates font size issues

https://gerrit.wikimedia.org/r/1004137

Change 1004168 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@wmf/1.42.0-wmf.18] Mitigates font size issues

https://gerrit.wikimedia.org/r/1004168

Change 1004137 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Mitigates font size issues

https://gerrit.wikimedia.org/r/1004137

Change 1004168 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@wmf/1.42.0-wmf.18] Mitigates font size issues

https://gerrit.wikimedia.org/r/1004168

Mentioned in SAL (#wikimedia-operations) [2024-02-16T16:59:46Z] <jdrewniak@deploy2002> Started scap: Backport for [[gerrit:1004168|Mitigates font size issues (T357724)]]

Mentioned in SAL (#wikimedia-operations) [2024-02-16T17:02:05Z] <jdrewniak@deploy2002> jdrewniak and jdlrobson: Backport for [[gerrit:1004168|Mitigates font size issues (T357724)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-02-16T17:09:51Z] <jdrewniak@deploy2002> Finished scap: Backport for [[gerrit:1004168|Mitigates font size issues (T357724)]] (duration: 10m 04s)

Jdlrobson renamed this task from Users are getting the incorrect default mobile font size to [Regression] Users are getting the incorrect default mobile font size.Feb 16 2024, 7:03 PM
Jdlrobson closed this task as Resolved.
Jdlrobson claimed this task.

We've made some changes that fix the following:

  • Anonymous users defaulting to a medium font size will now get the SMALL font size. Note: One of the downsides of this is that users who wanted medium will not get it until cache has cleared.
  • The line height is now relative to the browser font size. This addresses issues where the ascenders were being cut off in certain browsers. This should address issues we saw with crammed line height such as this one: https://twitter.com/iCloud_VII/status/1758552029998313620
  • We'll continue the conversation about concerns relating to the slight change in line height in T357770 next week. Currently there is too much noise from the above two issues to clearly hear people's concerns and evaluate what a suitable response would be.

Sorry for any disruption these issues have caused to your workflow.

ovasileva updated the task description. (Show Details)
Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: dewiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Anonymous users defaulting to a medium font size will now get the SMALL font size. Note: One of the downsides of this is that users who wanted medium will not get it until cache has cleared.
see below.

✅ AC2: The line height is now relative to the browser font size. This addresses issues where the ascenders were being cut off in certain browsers.
see below.

screenshot 537.png (848×397 px, 70 KB)

screenshot 536.png (846×390 px, 175 KB)

screenshot 538.png (844×390 px, 160 KB)

Change 1008558 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] Remove temporary class on HTML element

https://gerrit.wikimedia.org/r/1008558

Change 1008558 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Remove temporary class on HTML element

https://gerrit.wikimedia.org/r/1008558