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

Color Contrast Not High Enough #302

Open
YuriDevAT opened this issue Nov 4, 2023 · 3 comments · Fixed by #313
Open

Color Contrast Not High Enough #302

YuriDevAT opened this issue Nov 4, 2023 · 3 comments · Fixed by #313
Labels
bug Something isn't working

Comments

@YuriDevAT
Copy link
Member

Description

Elements must meet minimum color contrast ratio thresholds to meet the WCAG 2 AA .

  • 4.5:1 for small text - 14pt bold (19 CSS pixels), or
  • 3:1 for large text - 18pt (24 CSS pixels)

Axe DevTools show that 6 elements do not meet color contrast on

Axe DevTools results showing 6 elements do not meet color contrast

Please find these elements and tips on how to improve in the next section 👇🏽

Screenshots

I will show two ways that are valid for all 6 elements, using the first element as an example.

TL;DR - How To Solve

  1. Increase the value to a minimum of 19px AND set font-weight to a minimum of 700.
  2. Change text-color to a minimum of #171717.

💡 Note: The black you are using #0F172A for the intro (Open Source community aimed at encouraging and promoting communication) would work just fine.


Element 1 - Link: <a><span>Get Started</span></a>

Get started today - link

How to solve

  1. Increase the value to a minimum of 19px AND set font-weight to a minimum of 700.
New values removes error
  1. Change text-color to a minimum of #171717. 💡 Note: The black you are using #0F172A for the intro (Open Source community aimed at encouraging and promoting communication) would work just fine.
New value removes error

Element 2 - Paragraph: <p>Everyone is welcome to come and contribute to our open source projects.</p>

Paragraph showing error not meeting color contrast

Element 3 - Paragraph: <p>Community of inclusive Open Source people - Collaboration 1st, Code 2nd! Join our GitHub Org.</p>

Paragraph showing error not meeting color contrast

Element 4 - Heading 3: <h3>Discord</h3>

Heading showing error not meeting color contrast

Element 5 - Heading 3: <h3>GitHub</h3>

Heading showing error not meeting color contrast

Element 6 - Button: <button><span>Subscribe</span></button>

Button showing error not meeting color contrast

Additional information

Please find more information on color contrast issue and WCAG AA

https://dequeuniversity.com/rules/axe/4.7/color-contrast?application=AxeFirefox
https://www.w3.org/WAI/WCAG21/Techniques/general/G18.html
https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html

@YuriDevAT YuriDevAT added the bug Something isn't working label Nov 4, 2023
@fi-krish
Copy link
Member

fi-krish commented Nov 6, 2023

Thank you yuri! Very helpful!

@fi-krish
Copy link
Member

@fi-krish fi-krish reopened this Dec 17, 2023
@CodeTorso
Copy link

Now the get started button just looks odd.

Can we have the background-color a bit more dark but the text as white??

This just looks more natural. I just feel like that, Not because I want to make my first PR in this project😄😄

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants