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

Dark High Contrast - text highlighted by ctrl-f is not legible #7537

Closed
mdavis-xyz opened this issue Dec 9, 2024 · 3 comments · Fixed by jupyterlab/jupyterlab#17065
Closed
Labels
bug status:Needs Triage Applied to issues that need triage tag:Accessibility

Comments

@mdavis-xyz
Copy link

Description

When selecting the dark high contrast theme, and using ctrl-f to search for text, the highlighted matched text is not readable. Maybe change the font colour to something dark for text matching a search pattern?

Image

Reproduce

  1. Change theme to dark high contrast
  2. Create a code cell, with contents
abc
abc
abc
  1. ctrl-f to search for ab
  2. See the ab part of each line highlighted

Expected behavior

It should be clear which text is highlighted, but also the value of the highlighted text.

Actual Behavior

The matched text is highlighted with a background colour equal to the font colour, so the text can't be read.

Ok, I searched for ab so I know the highlighted text will contain ab. That's what makes this such a negligible bug. But perhaps I mis-typed, and I'm about to replace all for the wrong search text. Seeing it in the code would be helpful.

Context

  • Operating System and version: Ubuntu 24.04 (server)
  • Browser and version: Firefox 132.0.2 - inside Ubuntu Gnome with the OS dark theme turned on
  • Jupyter Notebook version:
$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.29.0
ipykernel        : 6.29.5
ipywidgets       : 8.1.5
jupyter_client   : 8.6.3
jupyter_core     : 5.7.2
jupyter_server   : 2.14.2
jupyterlab       : 4.3.2
nbclient         : 0.10.0
nbconvert        : 7.16.4
nbformat         : 5.10.4
notebook         : not installed
qtconsole        : not installed
traitlets        : 5.14.3

@mdavis-xyz mdavis-xyz added bug status:Needs Triage Applied to issues that need triage labels Dec 9, 2024
@krassowski
Copy link
Member

krassowski commented Dec 9, 2024

The styles for it are defined in here. I think that for the fix we would need to override/adjust --jp-search-unselected-match-background-color value for dark high contrast theme.

@krassowski
Copy link
Member

Is setting the text color to black here appropriate?

@mdavis-xyz
Copy link
Author

Yes, black should be fine, I think.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Needs Triage Applied to issues that need triage tag:Accessibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants