Blueprint: [core] button, form control, search input focus styling changed in Chrome 83

Created on 27 May 2020  路  7Comments  路  Source: palantir/blueprint

Environment

  • __Package version(s)__: 3.28.0
  • __Operating System__: Ubuntu 16.04
  • __Browser name and version__: Chrome 83.0.4103.61

Code Sandbox

https://codesandbox.io/s/blueprint-sandbox-uk6kk?file=/src/index.tsx

Actual behavior

This just happened after I upgrade Chrome from version 81 to version 83.

As you will see in the sandbox, there is a white border shown after you click on it.

image

Possible solution

I have no idea.

I am wondering if you have the same issue on Chrome with version 83.

Chrome P3 core

All 7 comments

it looks like Chrome updated default form element styling in v83:

and the new user agent styling can be overridden with the :focus-visible pseudo element: https://web.dev/style-focus/#use-:focus-visible-to-selectively-show-a-focus-indicator

relatedly, styling of the "clear" button on search inputs has changed with Chrome 83:

image

(h/t @moorerc, thanks for reporting)

I downloaded an old version of Chromium to take a closer look at this. The change affects a few components:

  • Button
  • Form controls (Checkbox, Switch, HTMLSelect)
  • Search inputs

Screenshots below, design analysis forthcoming

Chrome 83

image
image

image image

image image

2020-06-03 10 07 21
2020-06-03 10 07 32

2020-06-03 09 59 57
2020-06-03 10 00 08

image

Chrome 81

image
image

image image
image image

2020-06-03 10 07 50
2020-06-03 10 08 00

2020-06-03 10 01 12
2020-06-03 10 01 25

image

There doesn't seem to be a lot I can do about this visual change, as my efforts to style :focus-visible haven't worked. If anyone has a working example of custom :focus-visible styling for the focus ring please share it.

I actually think the new focus rings look better, especially in the dark theme, where there is much better (accessible) contrast with the background. I'm sure the old focus rings wouldn't pass WCAG 2.0 standards. So I'm inclined to keep the new styling. The one thing we might want to reconsider is the style for checkboxes in light theme, it's pretty subtle:

2020-06-03 10 07 21

Regarding the search input "clear" icon change. I also don't see a way to add custom styles there, but I don't think the new visuals are a regression. The cross works just as well as the old icon. Note that Firefox doesn't even have a "clear" button / icon in that location.

@adidahiya Sorry to ask again. Are you plan to solve this problem ? We still think these rings looks wired especially in the dark theme.
image

@wisdomG how did you create that example? Note that this is not a regression; the old focus styles did sometimes have issues of z-index ordering of the focus rings too:

image

And, like I said:

I actually think the new focus rings look better, especially in the dark theme, where there is much better (accessible) contrast with the background. I'm sure the old focus rings wouldn't pass WCAG 2.0 standards.

@adidahiya The example is here.
https://codesandbox.io/s/blueprint-sandbox-forked-8dx9o?file=/src/CoreExample.tsx
The example is runing on Chrome 85
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tnrich picture tnrich  路  22Comments

Binck360 picture Binck360  路  25Comments

romanr picture romanr  路  67Comments

adidahiya picture adidahiya  路  18Comments

basarat picture basarat  路  17Comments