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

A11y color contrast #6964

Open
1 of 2 tasks
gvillo opened this issue Oct 10, 2024 · 1 comment
Open
1 of 2 tasks

A11y color contrast #6964

gvillo opened this issue Oct 10, 2024 · 1 comment
Labels
Deferred PR that is not planned to be merged until next major version

Comments

@gvillo
Copy link

gvillo commented Oct 10, 2024

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.13.2

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

All

Describe the bug

We noticed that some components with many default palette colors are not passing a11y color contrast.

Example: Button variant='light' (violet)
image

This can be tested using devtools in Mantine docs site: https://mantine.dev/core/button/ (I think it works fine mostly with blue, but using the rest of the colors, it's not passing the tests for most of the components).

Edit: Wondering if this is being tested with axe (based on what help center says about accesibility: https://help.mantine.dev/q/are-mantine-components-accessible, it mentions everything except color contrast)

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

I think this can be addressed fixing default color palettes https://mantine.dev/theming/colors/#default-colors, so it can pass a11y color contrast test.

Color contrast should work ok with library default colors, or at least that's what we expect as a user. I am not saying that this should work ok out of the box using a custom palette, because the shades could be wrong.

Self-service

  • I would be willing to implement a fix for this issue
@gvillo
Copy link
Author

gvillo commented Oct 13, 2024

adding more examples, Alert:
image

@rtivital rtivital added the Deferred PR that is not planned to be merged until next major version label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deferred PR that is not planned to be merged until next major version
Projects
None yet
Development

No branches or pull requests

2 participants