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

fix custombutton colors for a11y contrast #6212

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

algoritmau
Copy link
Contributor

The color contrast between the current CustomButton's background-color (#aaa) and color/border-color (#f1c40f) does not meet the minimum WCAG criteria. It fails the WCAG AA Standard with a contrast ratio of 1.4.

Since it's kind of hard to meet the contrast ratio standard by keeping a vibrant yellow color (similar to the current one) and a light background, I consider it better to switch the yellow color for an orange/tan color (similar to the Svelte color) and a lighter background color, so it passes WCAG AA.

@benmccann
Copy link
Member

Can you share a screenshot of the before and after?

@algoritmau
Copy link
Contributor Author

Sure, @benmccann.

Here's a screenshot illustrating the current/proposed styles. The proposed colors have a contrast of 4.53, which results in compliance with WCAG standards.

svelte-pull-6212

@benmccann benmccann merged commit 2723427 into sveltejs:master Apr 21, 2021
@algoritmau algoritmau deleted the custombutton-colors branch April 21, 2021 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants