Closed Bug 1935250 Opened 9 months ago Closed 8 months ago

Moz-message-bar text is not readable on dark HCM themes

Categories

(Toolkit :: UI Widgets, defect, P2)

defect

Tracking

()

RESOLVED FIXED
135 Branch
Accessibility Severity s2
Tracking Status
firefox-esr128 --- unaffected
firefox133 --- unaffected
firefox134 --- fixed
firefox135 --- fixed

People

(Reporter: ayeddi, Assigned: mkennedy)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: access, regression, Whiteboard: [recomp])

Attachments

(2 files)

With HCM enabled, the message bar's text is not readable because the browser-toolbox-background is relying on --toolbox-textcolor-inactive variable that resolves in black text on black background on Win11 Night Sky theme (attached screenshot of the startup-restore-session-suggestion infobar), dark gray text against gray background on other default dark High Contrast themes and it is not readable on them all.

It is expected that the foreground color would be using CanvasText system color to be used against the (current) background Canvas color to ensure all HCM themes would provide color pair expected by a user.

Figma reference for a HCM infobar component (WIP) - SSO required to access

Set release status flags based on info from the regressing bug 1928151

:emilio, since you are the author of the regressor, bug 1928151, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

I'm confused, did you confirm that was the regressing bug with mozregression? The toolbox text / background pair is fine, otherwise the tabs would have no contrast. it just seems that the message bar overrides the background but not the color?

I can look at it regardless I suppose

Flags: needinfo?(emilio) → needinfo?(ayeddi)
Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

I'm confused, did you confirm that was the regressing bug with mozregression? The toolbox text / background pair is fine, otherwise the tabs would have no contrast. it just seems that the message bar overrides the background but not the color?

I can look at it regardless I suppose

Not at the moment, wasn't sure how to trigger the infobar again thus poked around styles... Sorry for the ping - moving this to the (more) appropriate regressor (MozRegression three times in a row tried to point to the bug 1920080 that has even less to do with the bug 1928151, but one of the patches' parents shed some light on the root cause).

Testing note:
In ASRouter Admin, search for "infobar" and press its "Show" button to get the message bar

Component: Sidebar → UI Widgets
Flags: needinfo?(emilio)
Flags: needinfo?(ayeddi)
Product: Firefox → Toolkit
Regressed by: 1906207
No longer regressed by: 1928151
Summary: Notification message infobar text is not readable on dark HCM themes → Moz-message-bar text is not readable on dark HCM themes

I guess this is not terribly hard to special-case, but I think the root cause of the issue is that some of these tokens don't have a suitable foreground color, they just kind of assume that the color is fine which it might not? Or I guess they assume they go against var(--text-color) in which case the code was right before bug 1906207

Hey Mark, can you take a look at this? It appears to be a regression from Bug 1906207. This is something we should fix sooner rather than later. It might be as straightforward as restoring the --message-bar-text-color: var(--text-color); and color: var(--message-bar-text-color); lines, but I haven't looked any further into it.

Severity: -- → S2
Flags: needinfo?(mkennedy)
Priority: -- → P2
Assignee: nobody → mkennedy
Flags: needinfo?(mkennedy)

Yeah the text color change seems to be out of scope of Bug 1906207 and the reason it was asked for initially isn't entirely clear. So I'm going to revert it and open a patch. Thank you!

Whiteboard: [recomp]
Pushed by hjones@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e522bfa98023 Revert removal of message-bar-text-color r=reusable-components-reviewers,desktop-theme-reviewers,hjones
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch

The patch landed in nightly and beta is affected.
:mkennedy, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox134 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(mkennedy)

Comment on attachment 9442574 [details]
Bug 1935250 - Revert removal of message-bar-text-color r?#recomp-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency:
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(mkennedy)
Attachment #9442574 - Flags: approval-mozilla-beta?

Comment on attachment 9442574 [details]
Bug 1935250 - Revert removal of message-bar-text-color r?#recomp-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: There was a regression in Windows HCM where the text of Firefox infobar messages cannot be read; Simple revert of CSS regressor
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): simple revert of code that already existed
  • String changes made/needed:
  • Is Android affected?: Unknown
Attachment #9442574 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: