Open Bug 1715946 Opened 3 years ago Updated 10 months ago

Consider replacing potentially hard to read `font-weight: lighter` with `font-weight: 300`

Categories

(Toolkit :: Themes, defect, P3)

Firefox 89
Unspecified
Linux
defect

Tracking

()

REOPENED
Accessibility Severity s3
Tracking Status
firefox89 --- affected
firefox90 --- affected
firefox91 --- affected

People

(Reporter: bugzilla, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: access, blocked-ux)

Attachments

(5 files)

+++ This bug was initially created as a clone of Bug #1715945 +++

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

  1. Set custom font in OS, Firefox inherits it
  2. Trigger "Server Not Found" error (open any non-existent domain, as for example)

Actual results:

Error title "Hmm. We’re having trouble finding that site." font is unreadable, because it's weight is overwritten in CSS ("font-weight: lighter").

Heading font-weight is overwritten because of aestethic feelings of designer.
Form over function.

Expected results:

Error title is rendered with readable font (css "font-weight: 700").
Heading font-weight is NOT overwritten because of aestethic feelings of designer. Function over form.

Attached image given.png
Attached image expected.png

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Text and Fonts
Product: Firefox → Core

This is not a Core bug, it's about the design/styling of the error page content. I'm not sure exactly who owns that - moving to Firefox:General as a starting point for further triage.

Component: Layout: Text and Fonts → General
Product: Core → Firefox

Hey Vladislav,
Can you test the issue while in Safe Mode? You can find helpful info here : https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode .
Also a fresh new profile could help. You can find more about creating a new profile here : https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems#w_6-create-a-new-firefox-profile .
If possible, you can test this issue on the nightly build as well. Download the build from : https://www.mozilla.org/en-US/firefox/nightly/all/ .

Flags: needinfo?(bugzilla)
Attached image ff89_safemode.png

can reproduce issue in safe mode.
i won't test in nightly

Flags: needinfo?(bugzilla)

Setting a component for this issue in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.

QA Whiteboard: QA-not-reproducible
Component: General → Messaging System

Moving to Security component to help triage Thanks

Component: Messaging System → Security

This isn't a Security issue, it's about the styling (theme) of the error page. Moving to Toolkit:Themes.

I see there are several places in Toolkit (and Browser) CSS where font-weight: lighter; is used on titles/headings. This is no doubt intended to make them less "dominating" than the default Bold styling that those HTML elements would use. With default system fonts on macOS and Windows, it results in a lighter but still quite readable font, but on Linux this is less predictable. The Ubuntu system font, for example, has a Light face that works OK, but if a user's theme defaults to Lato instead (as I suspect is the reporter's case), font-weight: lighter (which resolves to weight 100) will use the "Hairline" face, which is the problem here -- it's extremely thin and not very readable.

A safer choice might be to use font-weight: 300 or even 200 in place of lighter, so that when the font family in use has a very wide range of weights, we don't go to quite such an extreme of lightness. (If there's only one lighter-than-normal face present, it won't make any difference; any less-than-400 value will resolve to the same light face. But if there are many degrees of lightness, we may not really want to pick the very thinnest here.)

Component: Security → Themes
Product: Firefox → Toolkit

(In reply to Jonathan Kew (:jfkthame) from comment #10)

if a user's theme defaults to Lato instead (as I suspect is the reporter's case)

It is Fira Sans.

This is no doubt intended to make them less "dominating" than the default Bold styling that those HTML elements would use

Heading is expected to be "dominating" and bold.

Hello,

I reproduced the issue on the latest Nightly (91.0a1/20210706214242), Beta (90.0/20210705185941) and Release (89.0.2/20210622155641) under Ubuntu 16.0 LTS.

I did not manage to change fonts on Windows 10 though so cannot provide results from that platform.

Initially, using GNOME Tweak Tool I changed the fonts to arbitrary ones but there were no issues with the error title. However, changing the fonts to variations of Lato as Comment 10 suggested did the trick and I reproduced the issue. For further details, see the attached screenshot.

Status: UNCONFIRMED → NEW
Ever confirmed: true

As of this writing, Nightly no longer specifies ludicrously thin weights. This issue can be closed, but it’d be great if someone could identify the commit that solved the issue.

It looks like this was changed by bug 1737043, where a .title-text { font-weight: 300 } property was added to aboutNetError.css, overriding the font-weight: lighter inherited from common-shared.css.

However, I see that there are still a number of occurrences of html|h1 { font-weight: lighter } in the toolkit CSS, so I am a bit concerned that although the specific case of the NetError page has been fixed, there may still be other places where the same issue would arise.

(In reply to Jonathan Kew [:jfkthame] from comment #15)

It looks like this was changed by bug 1737043, where a .title-text { font-weight: 300 } property was added to aboutNetError.css, overriding the font-weight: lighter inherited from common-shared.css.

However, I see that there are still a number of occurrences of html|h1 { font-weight: lighter } in the toolkit CSS

:jfkthame is this gecko not correctly rendering the lighter font-weight? We can make the changes to 300 but this seems like a band-aid for a legitimate issue?

Flags: needinfo?(jfkthame)

No, AFAICS gecko is doing the correct thing with lighter, given the available weights in the Lato family.

Checking https://fonts.google.com/specimen/Lato?query=lato shows a "Light" face with weight=300, which I think would look reasonable here (if you don't want the default bold headings); but according to the CSS spec, lighter resolves to weight=100 (when the base weight in the context is 400), and that means we get the "Thin" (weight=100) face, which is extremely light.

Unless you really want a potentially very light face (depending on the font family being used), requesting 300 rather than lighter is the safer option.

Flags: needinfo?(jfkthame)

Ok so it looks like this particular bug can be resolved, but we might want to open new bugs to evaluate the other instances of font-weight: lighter case by case to see if those should be switched to a value of 300.

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1737043
Resolution: --- → DUPLICATE

(In reply to Sam Foster [:sfoster] (he/him) from comment #18)

Ok so it looks like this particular bug can be resolved, but we might want to open new bugs to evaluate the other instances of font-weight: lighter case by case to see if those should be switched to a value of 300.

Let's just morph this bug to cover that.

Severity: -- → S3
Status: RESOLVED → REOPENED
Depends on: 1737043
No longer duplicate of bug: 1737043
Keywords: access, blocked-ux
Priority: -- → P3
Resolution: DUPLICATE → ---
Summary: Unreadable font-weight of error page title → Consider replacing potentially hard to read `font-weight: lighter` with `font-weight: 300`
Depends on: 1779302
Blocks: 1779302
No longer depends on: 1779302
Depends on: 1875396
Attached image Fx-124.0a1.png

It looks like the issue was resolved with the bug Jules listed above.

Accessibility Severity: --- → s3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: