fundamental-styles icon indicating copy to clipboard operation
fundamental-styles copied to clipboard

bug(styles): focus outline

Open platon-rov opened this issue 2 years ago • 3 comments

Describe the bug

Here is two big issues about the focus outline.

  1. Focus outline cannot be rounded in Safari. It doesn't work like that.
image
  1. In Fiori, Fiori HC, Horizon HC (7 of 9 themes in total) we should have rectangular focus outline. In Chromium-based & Firefox focus outline inherits border-radius from the element. Only in Horizon Evening & Morning focus should be rounded.

Fiori image

Horizon image

Horizon HC image

Possible approach

Use pseudo elements (before/after) to create focus outlines that won't be relying on elements' border-radius and, also, these outlines may be rounded in Safari.

Pros:

  • Focus outline 100% per specs.
  • Safari issue solved.

Cons:

  • Somewhere both of the pseudo elements already in use.
  • A lot of work to do (incl. specific spacings).

platon-rov avatar Jun 06 '22 15:06 platon-rov

Can we list all the components which are affected? and which cannot rely on the pseudo-elements?

droshev avatar Jun 06 '22 18:06 droshev

See updated list below https://github.com/SAP/fundamental-styles/issues/3541#issuecomment-1153874478

Not per specs (rounded outline but should be rectangular in fiori, horizon hc):

  • Button
  • Calendar
  • Product Switch
  • Token

Per specs but broken in safari (outline cannot be rounded in Horizon):

  • Checkbox
  • Input Group
  • Input
  • Radio
  • Textarea
  • Select
  • Slider
  • Step Input

Not sure (no outline design specs found):

  • Avatar?
  • Avatar Group?
  • Busy indicator?
  • Carousel?
  • Rating Indicator?
  • Menu? First & Last
  • Micro Process Flow?
  • Object Marker?
  • User Menu?
  • Tree?
  • List?
  • Icon Tab Bar?
  • Tabs?
  • Status Indicator?
  • Side Navigation?
  • Vertical Navigation?
  • Horizontal Navigation?
  • Dynamic Page?

Under the "Not sure" section listed all the components for which outline specs not fully clear in Horizon, for example Avatar - its outline should be rectangular in Fiori & Horizon HC but should it be rectangular/rounded/circle in Horizon? Here is what said in the wiki:

In Horizon, unlike in the previous themes, focus visualisation varies between controls - in color and in placement. Please check individual controls for focus specifications.

platon-rov avatar Jun 06 '22 20:06 platon-rov

Not per specs (rounded outline but should be rectangular in fiori, horizon hc):

  • Button
  • Calendar
  • Product Switch
  • Token

Per specs but broken in safari (outline cannot be rounded in Horizon):

  • Checkbox
  • Input Group
  • Input
  • Radio
  • Textarea
  • Select
  • Slider
  • Step Input
  • Avatar
  • Avatar Group
  • Busy Indicator
  • Rating Indicator
  • Micro Process Flow
  • Icon Tab Bar
  • Tabs

Don't round in popover (https://github.com/SAP/fundamental-styles/issues/3576):

  • Menuc
  • User Menu
  • Tree
  • List

platon-rov avatar Jun 13 '22 12:06 platon-rov

Chrome and Firefox issue is no longer relevant:

Screenshot 2023-07-20 at 9 18 03 AM Screenshot 2023-07-20 at 9 18 11 AM Screenshot 2023-07-20 at 9 18 26 AM

 

Safari is able to round buttons:

Slider: Screenshot 2023-07-20 at 9 14 26 AM (2)

Input: Screenshot 2023-07-20 at 9 15 40 AM (2)

IB002 avatar Jul 20 '23 13:07 IB002