Closed Bug 1754592 Opened 2 years ago Closed 2 years ago

With HCM enabled and Firefox's default theme, primary buttons' focus rings are invisible

Categories

(Toolkit :: Themes, defect)

defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox-esr91 --- unaffected
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- verified

People

(Reporter: itiel_yn8, Unassigned)

References

(Regression)

Details

(Keywords: regression, Whiteboard: fixed by bug 1755023)

Attachments

(1 file)

(The above title is a manifestation of the actual issue; feel free to rename as you see fit)

STR:

  1. Set Windows to White HCM, non dark mode
  2. Set Nightly to default theme
  3. Open any webpage
  4. Open the bookmarks panel and tab to Save (or even the checked checkbox before it), you'll see no focus ring as it's set to white -- the same as the "Save" text color

AR:
The focus ring blends with the doorhanger white background

ER:
Visible focus ring

This regressed by bug 1706534 but it's not "to blame", as it seems the "nested" vars (--focus-outline is made of more vars, including --focus-outline-color) this patch uses, cause the outline color to fallback to currentColor.
The CSS responsible here is at:
https://searchfox.org/mozilla-central/source/toolkit/themes/shared/popupnotification.inc.css#146-149,162

Quoting morgan from Matrix, a11y channel:

I think I figured it out -- --focus-outline-color decomposes to outline: 2px <vars>. outline gets further decomposed into outline-[style|color|width]. We ignore outline-colors when processing our style sheet in forced colors mode: https://searchfox.org/mozilla-central/rev/c12a59323ee46b29b90c9917a3a7a70ea714ffec/servo/components/style/properties/longhands/outline.mako.rs#20

its initial color is currentColor, which is what gets rendered when we revert

Per discussion the outline color should be -moz-accent-color, which should work because it's a system color. Works here on Linux with high-contrast white, but I might be missing something. I can test Windows tomorrow I guess.

Wait but this is in the parent process, so I'm clearly missing something, because we don't do those restrictions there.

This is not a layout / CSS engine issue. See incoming test-case:

Component: Layout → Themes
Product: Core → Toolkit
Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
Regressed by: 1706534

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

Depends on: 1755023
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Whiteboard: fixed by bug 1755023
Flags: qe-verify+

Reproduced this issue on an affected nightly build (2022-02-09) on Windows 10 x64.
Verified as fixed on Firefox 99.0b7 (20220322185926) on Windows 10 x64.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: