Open Bug 1720994 Opened 5 years ago Updated 5 years ago

Dotted focus ring around browser can't be removed by preferences or CSS

Categories

(Core :: Layout, enhancement)

Firefox 92
enhancement

Tracking

()

People

(Reporter: aminomancer, Unassigned)

Details

Attachments

(1 file)

Attached image Screenshot (16).png —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

  • Go to about:blank or some other mostly empty document.
  • Press ctrl+L.
  • Tab focus into the selected <browser>

Actual results:

  • 2px dotted outline around the browser. Color is black or white, presumably depending on the content. Maybe it's -moz-mac-focusring.

It's actually kinda weird since an outline around the border would ordinarily fall outside the bounds of the browser and therefore be invisible. Instead it seems offset by 2px, not in every direction but offset in the sense of a box shadow, it's 2px down and 2px right. Because it gets cut off completely at the bottom, and (at least for me with 150% dpi scaling) gets cut off by 1px on the right.

It's super ugly and isn't affected by any of the focus outline rules in the user agent sheets. Making new rules doesn't affect it either. Even the most permissive rule I can think of doesn't work, *|*{outline:none!important;border:none!important;}

It also isn't affected by prefs like accessibility.tabfocus, canvas.focusring.enabled, browser.display.focus_ring_on_anything, browser.display.focus_ring_style, browser.display.focus_ring_width, or browser.display.show_focus_rings

I can't see a corresponding rule on anything in the browser toolbox or the content toolbox. If I had to guess, it must have something to do with the Look & Feel component, which would explain why I can't get rid of it with CSS.

I tried reading this to see if I could glean any useful information from it, but it doesn't seem like this has changed in a long time. I remember this going back years and it's always irritated me, but I didn't know it was completely impossible to remove.

Expected results:

  • At least when widget.disable-native-theme-for-content is set to true, the focus ring style should be consistent with that of unstyled form controls. e.g. it should have the same focus ring as outline-style: auto like a 2px solid blue outline.
  • Ideally there should be a pref to disable it, or there should be some way to remove it with user stylesheets. There could be a native anonymous pseudo-element selector, like I could say ::-moz-browser-focusring{outline:0!important;} and hide it completely. That would be my preference personally but I'm sure for accessibility reasons it shouldn't be hidden by default.
  • If there was a way to select it with CSS then this could be affected by theme variables. It could be put in an author sheet to derive its color from toolbar_field_border_focus or something. Or make a new lwt property for it? Such a prominent and (imo) gaudy style shouldn't be completely opaque to the existing avenues for user customization.

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

Component: Untriaged → Preferences
Severity: -- → S4
Priority: -- → P3

Hi,

i tried on windows10 64bit with Firefox nightly 92.0a1 and i see the dots border on the right side and bottom side too.
Anyway i will set this an an enhancement, to see if there is a way to have it changed.

thanks

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Component: Preferences → Layout
Ever confirmed: true
Product: Firefox → Core

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --

Maybe the offset depends on the dpi/scaling factor

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: