`outline-style:auto` didn't become the default focus ring if the user has toggled `browser.display.focus_ring_on_anything`
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | affected |
People
(Reporter: dholbert, Unassigned)
References
(Blocks 1 open bug)
Details
STR:
- Set about:config pref
browser.display.focus_ring_on_anything
totrue
. - Load attached testcase and press
Tab
key to focus the link.
EXPECTED RESULTS:
Solid outline, matching the behavior that you'd get if you didn't toggle the pref.
ACTUAL RESULTS
Dotted outline.
Note: Nightly 2022-03-17 is the first Nightly to draw a solid outline by default (if you skip STR step 1), but I confirmed that it still draws a dotted outline if you do flip the pref per STR step 1.
As emilio noted in bug 1821890 comment 8, this seems to be an oversight, and the relevant code that's forcing a dotted outline seems to be https://searchfox.org/mozilla-central/rev/6fc2f6d5335fb6f70f780b5fea5ed77b0719c3b5/layout/style/GlobalStyleSheetCache.cpp#608-630
Reporter | ||
Comment 2•2 years ago
|
||
This bug also reproduces if you toggle the pref browser.display.focus_ring_width
to 2
(because we hit the same codepath linked in comment 0, via passing the focusRingWidth != 1 && focusRingWidth <= 4
condition).
Does this also concern browser.display.focus_ring_style
as well?
Maybe it's a bug that changing the settings mentioned in the OP results in a dotted line, but it also seems to be the only way to get a dotted line, because browser.display.focus_ring_style
apparently has no effect on the style (solid, or dotted I would assume) of the outline.
Reporter | ||
Comment 4•2 years ago
|
||
(In reply to avada from comment #3)
Does this also concern
browser.display.focus_ring_style
as well?
It's related; that pref is only used once in the entire codebase, and it's in the code snippet that's linked here. (i.e. focus_ring_style
isn't actually general "should my focus ring be dotted or solid" pref right now -- it only takes effect in this special case codepath.)
(I think this pref is kind of a legacy thing, which is why it only makes a difference in this legacy-codepath special-case corner. I'm not sure if the intent is for it to generally work, and I don't know if our default outline-style:auto
outline is easy to make dotted vs. solid via this pref.)
Description
•