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

Improve contrast ratio of some links when the design is ready #331

Closed
cindyli opened this issue Jul 16, 2020 · 8 comments · Fixed by #343
Closed

Improve contrast ratio of some links when the design is ready #331

cindyli opened this issue Jul 16, 2020 · 8 comments · Fixed by #343
Labels
bug Something isn't working
Milestone

Comments

@cindyli
Copy link
Contributor

cindyli commented Jul 16, 2020

Describe the bug

Running lighthouse report on "Inclusion Challenges" page and News and Views post pages will report low contrast ratio on:

  1. “Nomination form” and "contact form” links on “Inclusion Challenges” page. They are currently blue on white;
  2. All tags (“AI”, “Inclusion” and “Smart Cities”) in the “Tags” sections on post pages. They are currently blue on orange;
  3. All links in the main article on “Learn” page and "Initiatives" page. They are currently blue on white;

To Reproduce

Steps to reproduce the behavior:

  1. Go to these pages and run lighthouse report;
  2. Check accessibility section for reported issues.

Expected behavior

These links should have higher contrast ratio.

@cindyli cindyli added the bug Something isn't working label Jul 16, 2020
@Raunaksingh100
Copy link

@cindyli @greatislander

hi i am facing this problem when i add this COMMAND "NPM RUN START" plz anyone tell me how i run this project in my local plz help,
see in the screenshot for the better understanding....

my issue with npm

@cindyli
Copy link
Contributor Author

cindyli commented Jul 21, 2020

hi i am facing this problem when i add this COMMAND "NPM RUN START" plz anyone tell me how i run this project in my local plz help,
see in the screenshot for the better understanding....

my issue with npm

@Raunaksingh100, did you hit the problem at running npm run start on a Windows platform? Did you use Powershell or Windows traditional CMD? If it's on Windows, try this sequence of commands instead of using npm run start:

npm run clean
SET ELEVENTY_ENV=development
npx eleventy --serve --port=3000 --config=eleventy.config.js

@cindyli cindyli added this to To do in We Count 2.2 via automation Jul 21, 2020
@cindyli cindyli added this to the 2.2.0 milestone Jul 21, 2020
@Raunaksingh100
Copy link

hi i am facing this problem when i add this COMMAND "NPM RUN START" plz anyone tell me how i run this project in my local plz help,
see in the screenshot for the better understanding....

my issue with npm

@Raunaksingh100, did you hit the problem at running npm run start on a Windows platform? Did you use Powershell or Windows traditional CMD? If it's on Windows, try this sequence of commands instead of using npm run start:

npm run clean
SET ELEVENTY_ENV=development
npx eleventy --serve --port=3000 --config=eleventy.config.js

For npm start we have to change the start command in package.json

Is this correct or wrong ???

Or simpley add this commands in poweshell
??

@cindyli
Copy link
Contributor Author

cindyli commented Jul 21, 2020

For npm start we have to change the start command in package.json

Is this correct or wrong ???

Or simpley add this commands in poweshell
??

You don't need to change package.json. Just run these commands in Powershell.

@Raunaksingh100
Copy link

Raunaksingh100 commented Jul 21, 2020

thanks its works @cindyli thanks a lot
can we review my pr i am facing some problem here th link of my pr
inclusive-design/idrc#39

@TeddTech
Copy link
Contributor

After implementing the design changes suggested in #322 to improve the visual appearance of the We Count website all of the contrast ratio issues mentioned still persist and now additionally includes the Tag Filter tags on Views page.

To reproduce this:

@cindyli
Copy link
Contributor Author

cindyli commented Jul 22, 2020

@uttaraghodke, @lliskovoi: following @TeddTech's comment about the persistence of the contrast ratio problem, we discussed this in an email thread before and @jobara's research result gave a good summary:

In WCAG 2.1, it defines the minimum contrast ratio to be 4.5:1 except for the case of Large Text (contrast ratio 3:1), incidental and logotypes.

What is Large Text? Large scale text is defined as 18 point or 14 point bold.

What is a point (pt) on a digital device? Well that’s confusing. (See: wcag issue #181). That discussion lead to an update to Understanding WCAG 2.1 document; which uses the CSS calculation and is based off a 16px base font if I’m not mistaken. 1pt = 1.333px, 14pt ≈ 18.5px and 18pt ≈ 24px.

The cause of the problem still persists after the design change that increases the article font size from 16px to 18px for the desktop layout because the size of the large text in WCAG 2.1 spec is 24px. Moreover, the changed font size for the mobile layout is even smaller.

I wonder if it would be more reasonable to increase contrast ratios by picking dark font colors or lighter background colors.

@cindyli
Copy link
Contributor Author

cindyli commented Jul 23, 2020

At today's meeting, the link colors are decided to change to:

  • Link text when the background is white: 5879A0
  • Link text when background is yellow (tags and link hover/focus): 4D6B8D

We Count 2.2 automation moved this from To do to Done Jul 24, 2020
cindyli pushed a commit that referenced this issue Jul 24, 2020
* fix: applied inline flex to tag fiter label span

* fix: changed colour of links causing contrast ratio issues

* fix: add colour variables for contrast link colours

* fix: change variable name of link colour on yellow backgrounds
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
No open projects
We Count 2.2
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants