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

Styled input checkbox focus state is not visible on Ubuntu/Firefox #14354

Closed
krassowski opened this issue Apr 10, 2023 · 5 comments
Closed

Styled input checkbox focus state is not visible on Ubuntu/Firefox #14354

krassowski opened this issue Apr 10, 2023 · 5 comments

Comments

@krassowski
Copy link
Member

krassowski commented Apr 10, 2023

Description

For checkboxes with jp-mod-styled class the focus state is not visible. This might be Operating System specific.

Reproduce

  1. Open search box in a notebook
  2. Open filters
  3. Tab to a checkbox
  4. See no focus indication

On Ubuntu/Firefox

Screenshot from 2023-04-10 15-28-33

The one on right is focused.

The styles are defined here:

input.jp-mod-styled:focus {
border: var(--jp-border-width) solid var(--md-blue-500);
box-shadow: inset 0 0 4px var(--md-blue-300);
}

but it has no effect on styles for me in Firefox on Ubuntu.

Manually adding outline: 3px solid red; to input.jp-mod-styled:focus shows an indication properly:

Screenshot from 2023-04-10 15-30-40

Of note, the styles are effective on Ubuntu/Chromium but the indicator is rather faint:

Screenshot from 2023-04-10 15-36-15

Expected behavior

Some kind of indicator is visible for checkboxes across browsers

Context

  • Operating System and version: Ubuntu
  • Browser and version: Firefox Nightly 108
  • JupyterLab version: 4.0.0b1
@JasonWeill
Copy link
Contributor

Also happens on Firefox ESR 102.9 on macOS with 4.0.0b1.

@krassowski
Copy link
Member Author

krassowski commented Apr 19, 2023

I just noticed that focus is visible on checkboxes within dialogs:

Screenshot from 2023-04-19 13-19-38

This is thanks to:

.jp-Dialog-checkbox > input:focus-visible {
outline: 1px solid var(--jp-input-active-border-color);
outline-offset: 1px;
}

I think that we should harmonise the styles so that it applies to all checkboxes with .jp-mod-styled (using input[type="checkbox"].jp-mod-styled:focus-visible selector).

Labelling as a good first issue, if someone wants to work on this please submit a (draft) pull request.

@alden-ilao
Copy link
Contributor

Hello! This is my first time taking a swing at open source contributions and would love some feedback if possible!

@fcollonval
Copy link
Member

Thanks @alden-ilao for working on this. @krassowski (thanks for the review), did #15612 fix this fully?

@krassowski
Copy link
Member Author

Yes, thanks for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants