Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ux] Native tab focus must not be visually supressed #2799

Open
mvorisek opened this issue May 24, 2023 · 3 comments
Open

[ux] Native tab focus must not be visually supressed #2799

mvorisek opened this issue May 24, 2023 · 3 comments
Labels
state/has-pr An issue which has a related PR open type/feat Any feature requests or improvements
Milestone

Comments

@mvorisek
Copy link
Contributor

Feature Request

When tabindex="0" is set to a (div) button, the div can be focused by a tab.

Currently when such div is focused, no native glow is present. I have identified this is because:
image
outline: none style.

Example (if possible)

  1. open https://dev.atk4.org/demos/form/form.php
  2. click the first input field
  3. press tab
  4. notice the button background changed very slightly, but native tab outline around the button is not present

Screenshot (if possible)

normal:
image

focused:
image

compare it with tab glow in https://dev.atk4.org/demos/interactive/paginator.php for example:
image

Expected fix/behaviour

Not sure why there is outline: none, but at least for :focus-visible pseudo class no outline: none style must be applied.

image
(focused button without outline: none style, notice the native outline/border around the button, the color is not much different visually, but the visual dimension difference makes it very easy to understand what button is (tab) focused)

@mvorisek mvorisek added state/awaiting-triage Any issues or pull requests which haven't yet been triaged type/feat Any feature requests or improvements labels May 24, 2023
@ko2in
Copy link
Member

ko2in commented May 24, 2023

Yes. As far as I know, it's by design ever since we've forked from SUI.

This less file is your friend for any customization where you can add the outline that suits your design and color pattern.

@mvorisek
Copy link
Contributor Author

This is UX problem of Fomantic-UI. It is present also with dropdown when navigated via tab.

regex to find empty outlines: outline(-\w+)*:.*(non|0)

local fix can be:

*:focus-visible {
  outline: 2px solid darkblue !important;
}

but this is not optimal, as it will override every element, even the ones that Fomantic-UI styles now like inputs.

@lubber-de
Copy link
Member

Removing the outline on focus for some components was decided by design since SUI was released in favor of using a different color of the whole component when the component gets focused.
Showing the outline does not fit the default theme anymore and would be a breaking change.

I prepared a PR which allows to customize that if desired and overrides the outline in case of focus by #2801

@lubber-de lubber-de added state/has-pr An issue which has a related PR open and removed state/awaiting-triage Any issues or pull requests which haven't yet been triaged labels May 24, 2023
@lubber-de lubber-de modified the milestones: 2.9.3, 2.9.x May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state/has-pr An issue which has a related PR open type/feat Any feature requests or improvements
Projects
None yet
Development

No branches or pull requests

3 participants