Closed Bug 1637771 Opened 5 years ago Closed 5 years ago

unthemed buttons shouldn't also show moz-focus-inner

Categories

(Core :: Layout: Form Controls, enhancement)

78 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: aja, Assigned: emilio)

References

Details

Attachments

(1 file)

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

Actual results:

buttons/button-like inputs showing outline focus-ring also show moz-focus-inner

Expected results:

buttons/button-like inputs showing outline focus-ring should not also show moz-focus-inner

Flags: needinfo?(emilio)
Summary: on buttons/button-like inputs showing outline focus-ring don't also show moz-focus-inner → on buttons/button-like inputs showing outline focus-ring shouldn't also show moz-focus-inner
Summary: on buttons/button-like inputs showing outline focus-ring shouldn't also show moz-focus-inner → buttons/button-like inputs showing outline focus-ring shouldn't also show moz-focus-inner

Why not? You mean in unthemed buttons? So focusing <input type="button" style="background: white"> and such?

Flags: needinfo?(william.f.goldstein2)

Why not?

  1. It's redundant with outline focus ring.
  2. It's 1990's ugly, and can't be styled.
  3. Can't even get rid of it with -moz-appearance:none; -webkit-appearance:none; appearance:none;
  4. It's an unnecessary difference with other rendering agents.
    My suggestion would be to remove the inner focus ring from button/button-like things from appearances button and auto as well as none.
    If someone really wants an inner vs outer ring, it can be accomplished with a negative outline-offset.
    I've noticed that the inner ring isn't displayed just by toggling focus on and off via devtools, but rather by tabbing to it.

I don't think themed vs unthemed makes a difference now...you're stuck with it regardless.

I suppose a multiple-ring syntax could be standardized in a manner similar to border and box-shadows, but why?

Flags: needinfo?(william.f.goldstein2)

It can be styled, using ::-moz-focus-inner { border: 0 } for example, fwiw.

It's used for windows buttons, and Windows still uses the inner focus if I'm not mistaken. So removing them by default for themed windows buttons is probably a no-go.

What's your thinking for widget.disable-native-theme-for-content=true?

and thanks! for the magic incantation ::-moz-focus-inner { border: 0 }

That shouldn't show inner focus rings for themed buttons. So I guess the only remaining bit is whether we should show it for un-themed buttons.

Now that we show outlines, I agree it may be good not to show two focus indicators for those...

Assignee: nobody → emilio
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(emilio)
Summary: buttons/button-like inputs showing outline focus-ring shouldn't also show moz-focus-inner → unthemed buttons shouldn't also show moz-focus-inner

Now that we have outlines for them, unthemed select / buttons show two
different focus indicators, which is undesired.

Furthermore, the ones in comboboxes are basically unremovable /
unstylable, so authors end up having to use massive hacks to do it, see
bug 1580935.

This fixes it elegantly (IMO) by just rendering them when themed (which
is what these were for anyway, to match the windows theme).

Depends on: 1583381
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60e704719c05 Don't draw inner focus ring styles for unthemed buttons / combo-boxes. r=jfkthame

LGTM

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: