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

[Feat]: Contrast ratio issue for buttons to improve accessibility #725

Open
sovetski opened this issue Aug 28, 2024 · 2 comments
Open

[Feat]: Contrast ratio issue for buttons to improve accessibility #725

sovetski opened this issue Aug 28, 2024 · 2 comments
Labels
enhancement New feature or request triage yet to be reviewed

Comments

@sovetski
Copy link

Description

Hi,

Current version of the library have a small issue with button color contrast

Light theme colors score:
image

Dark theme colors score:
image

To improve the accessibility score, the contrast ratio must be at least 7:1

Proposed solution

To improve it, I suggest these colors:

#cc-main {
	--cc-btn-secondary-bg: #414e55;
	--cc-btn-secondary-color: #fff;
}

.cc--darkmode #cc-main {
	--cc-btn-secondary-bg: #96b6cd;
	--cc-btn-secondary-color: #1e1e1e;
}

With these changes:

Light mode before:
image

Light mode after:
image

Light mode new score:
image

Dark mode before:
image

Dark mode after:
image

Dark mode new score:
image

Additional details

No response

@sovetski sovetski added enhancement New feature or request triage yet to be reviewed labels Aug 28, 2024
@sovetski
Copy link
Author

@alxndr-w
Copy link

alxndr-w commented Aug 29, 2024

Nobody with a disability would complain about that.

The idea of different button backgrounds is to recognize "accept/reject" as easiest options and "preferences" for advanced information and settings.

Your suggestion may make some tools happy, but in fact worse for everybody.

Yes, the contrast between button and background is not visible - even for me. But that's not the point.

The label of the button is clearly visible, clickable and therefor usable and accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage yet to be reviewed
Projects
None yet
Development

No branches or pull requests

2 participants