Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Chore(focus): new focus indicator #3253

Closed
wants to merge 5 commits into from
Closed

Chore(focus): new focus indicator #3253

wants to merge 5 commits into from

Conversation

AugustinMauroy
Copy link
Contributor

Description

Fixing unclear focus indicator and remove useless indicator

Context of this choice:

Context

Render:

Capture d’écran 2023-03-03 à 12 05 05

Capture d’écran 2023-03-03 à 12 06 03

Related Issues

Related issue #2925

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run lint:js -- --fix and/or npm run lint:md -- --fix for my JavaScript and/or Markdown changes.
    • This is important as most of the cases your code changes might not be correctly linted
  • I have run npm run test to check if all tests are passing, and/or npm run test -- -u to update snapshots if I created and/or updated React Components.
  • I have checked that the build works locally and that npm run build work fine.
  • I've covered new added functionality with unit tests if necessary.

@AugustinMauroy AugustinMauroy changed the title Chore(focus) Chore(focus): new focus indicator Mar 3, 2023
@ovflowd ovflowd added the create-preview Generate preview on staging.nodejs.dev label Mar 3, 2023
@github-actions github-actions bot removed the create-preview Generate preview on staging.nodejs.dev label Mar 3, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Please find a preview at: https://staging.nodejs.dev/3253/

@ovflowd
Copy link
Member

ovflowd commented Mar 3, 2023

I still don't believe this is a good focus indicator. Not to mention you're removing the outline of one of the components, which is not a good idea.

We already went over and over the why's. I appreciate you want to come up with a solution, but this is not a good solution, and it was explained why in the Issue.

As mentioned before, the issue is that for items with a green border or background, adding a "focus" class with a very similar colour isn't suitable for contrast reasons. For example, the screenshot below:

image

Not to mention, the focus colour should also be different based on our theme. I still believe we could either:

  • Pick two neutral contrast colours for each theme (light/dark)
  • Pick two accent colours (accent colours are colours that follow our colour schema) for each theme (light/dark) with the caveat that for elements that have borders/backgrounds similar to the accent colour, we should provide a different colour for 'em.

We should apply outline-offset CSS property and use :outline-visible instead of :outline.

@AugustinMauroy
Copy link
Contributor Author

We should apply outline-offset CSS property and use :outline-visible instead of :outline.

I will add this.

@ovflowd ovflowd closed this Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants