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

On dark theme, there are 4 colors a part of the code syntax hightlighter in the code blocks that needs better contrast from the background. On light theme this number is 6. Both of these need to reach a 4.5:1 contrast ratio #6929

Open
Tracked by #6800
tonyfast opened this issue Jun 16, 2023 · 4 comments

Comments

@tonyfast
Copy link
Collaborator

tonyfast commented Jun 16, 2023

Color, Contrast, and Zoom

Issue Area # 1

  • Expectation: Do the default text and background size and colors provide sufficient contrast? (WCAG Criteria 1.4.3 (AA))
  • Observed:
    • On both dark and light themes, the colors found within the code blocks (the syntax highlighting) needs 4 and 6 color changes respectively. Both of these need to reach a 4.5:1 contrast ratio between and its background.These also ideally need to have a certain contrast (3:1) between one another so they stand out (a different WCAG requirement), but there are too many colors used that all may appear adjacent to one another that this does not seem possible so can ignore. I recognize this might be a different codebase but wanted to flag at least.
@tonyfast
Copy link
Collaborator Author

@steff456 do you have pygments themes that would solve this problem?

@afshin you think there is any way we could make a play to change the dark theme to something with better color contrast if it existed?

@steff456
Copy link

steff456 commented Jun 16, 2023

Hi! Yes, all the themes included in accessible pygments are compliant with WCAG 2.1.

Is there a way to add it as a dependency and then change the default theme?

I think the only issue I can see is that we don't have any theme inspired in Jupyter defaults.

@tonyfast
Copy link
Collaborator Author

related to jupyterlab/jupyterlab#10008

@tonyfast
Copy link
Collaborator Author

seems like style questions can be hard jupyterlab/jupyterlab#7779

there are a few outstanding dark theme issues and opinions. it seems that accessibility should over ride most opinions.

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

3 participants