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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility contrast issue with ripples #31372

Closed
2 tasks done
eGene opened this issue Mar 8, 2022 · 1 comment
Closed
2 tasks done

Accessibility contrast issue with ripples #31372

eGene opened this issue Mar 8, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@eGene
Copy link

eGene commented Mar 8, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

Ripples styles in MUI v5 can not be overridden with createTheme's overrides section and are calculated internally based on current color palette. In many cases this leads to low contrast between the ripple and background or between the normal and focused state of the element. Example:
Screen Shot 2022-03-08 at 10 31 54 AM

Relevant WCAG secrtion: https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-minimum.html

In the example above the contrast ratio is below 2. It fails requirements for text variant for both normal vs focused vs background color, and for non-text variants (since they have a border) it fails contrast requirement for normal vs focused.

Expected behavior 馃

I assume fixing it with automatically picked colors may be impossible, so user should at least be able to override the default styles for the ripples with theme overrides.

Steps to reproduce 馃暪

Steps:

  1. this is reproducible with many components. For example, go here https://mui.com/components/buttons/
  2. and focus on a button to see the ripple
  3. check the contrast ratio

Context 馃敠

Trying to make the app a11y compliant. Would also like to hear MUI's team thoughts on this issue with contrast and what they think would be the best approach to solve it.

Your environment 馃寧

No response

@eGene eGene added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 8, 2022
@danilo-leal
Copy link
Contributor

Hey @eGene, thanks for opening this issue up! I know it was me who asked you to open it but I only now realized we already had one (#28543) opened for this issue, so this is a dupe 馃槄

Would also like to hear MUI's team thoughts on this issue with contrast and what they think would be the best approach to solve it

If you're talking about focus contrast issues specifically, I might've just realized we might be lacking proper documentation on this. So I think we could use the opportunity to improve on that front as well.

I'll close it for now but we can continue discussing there! Please share your thoughts there too if you could.

@michaldudak michaldudak added duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 24, 2022
@michaldudak michaldudak closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2022
@michaldudak michaldudak removed their assignment May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants