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

Project name colours are not accessible #6338

Open
6 tasks done
mikeybinns opened this issue Aug 13, 2024 · 1 comment
Open
6 tasks done

Project name colours are not accessible #6338

mikeybinns opened this issue Aug 13, 2024 · 1 comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@mikeybinns
Copy link

Describe the bug

When running vitest UI on a Vitest Workspace, some of the workspace names are in a colour that is very hard to look at / read.

I can see the colours are basically defined here:

const colors = ['blue', 'yellow', 'cyan', 'green', 'magenta']

In particular, blue is hard to read on dark mode, and yellow is hard to read on light mode.

All colours used should be checked against an accessibility colour checker to ensure their contrast is high enough, and this likely means having a different colour set for light mode and dark mode, as it's hard to have a single colour which works for both and also looks good.

Here are some screenshots:
image
image

Reproduction

To reproduce, start with the Workspace vitest example:
https://github.com/vitest-dev/vitest/tree/main/examples/workspace
Then rename one of the package folders to cli (this won't be the only way to force it to be blue, just one I know works)
Run UI tests and set your theme in vitest UI to dark mode
See result:
image

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 201.28 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.15.0 - ~/.nvm/versions/node/v20.15.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.0/bin/npm
  Browsers:
    Chrome: 127.0.6533.100
    Safari: 17.5
  npmPackages:
    @vitejs/plugin-react: ^4.2.1 => 4.3.1 
    @vitest/ui: latest => 2.0.5 
    vite: latest => 5.4.0 
    vitest: latest => 2.0.5

Used Package Manager

npm

Validations

@AriPerkkio AriPerkkio added p2-nice-to-have Not breaking anything but nice to have (priority) and removed pending triage labels Aug 14, 2024
@AriPerkkio
Copy link
Member

There's related PR open that likely fixes this: #6329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

2 participants