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

update node-green to pass WCAG AA #536

Merged
merged 5 commits into from
Mar 3, 2016
Merged

Conversation

jrit
Copy link
Contributor

@jrit jrit commented Feb 25, 2016

Based on the new colors defined with the updated logo,
this is the the closest green that passes on a white
background for small text where a contrast ratio
of 4.5 is required.

Resolves #501

Here are some previews of how this will look:

nodejs-docs
nodejs-home

Based on the new colors defined with the updated logo,
this is the the closest green that passes on a white
background for small text where a contrast ratio
of 4.5 is required.
@mikeal
Copy link
Contributor

mikeal commented Feb 25, 2016

The big buttons seem a little dark. I'm worried about them looking actionable enough, maybe a slightly brighter green and the green in this screenshot as the rollover color?

Home page updated for aesthetics, download page updated for contrast
@jrit
Copy link
Contributor Author

jrit commented Feb 25, 2016

Thanks @mikeal - updated the buttons, I agree they looked dull. I shifted the rollover color a bit based on the default state. Also had to update the download page a bit since the gray background during hover made the new node-green nearly unreadable.

button revised

downloads

@ghost
Copy link

ghost commented Feb 25, 2016

i actually prefer the first set of button colors :X the second set looks a bit too much like color: green or something

@jrit
Copy link
Contributor Author

jrit commented Feb 25, 2016

I'll let this stand until at least tomorrow to maybe get some broader consensus. Thanks.

@ghost
Copy link

ghost commented Feb 25, 2016

@jrit thank you for doing this 😄

@stevemao
Copy link
Contributor

I generally like the new colours. Thanks @jrit :)

@phillipj
Copy link
Member

I prefer the brighter ones in your updated version

@jrit
Copy link
Contributor Author

jrit commented Feb 26, 2016

Sounds like 2 votes for bright buttons and one for dull. I'm leaning toward the brighter one as well. I'm on standby if anyone has any further requirements before this can be merged.

@ghost
Copy link

ghost commented Feb 26, 2016

we should wait for @mikeal to respond since he was the one that originally asked for the color change :P
will merge after that though!

@Fishrock123
Copy link
Contributor

Woot, the website's colors have felt just not right for like a week now since the new logo haha. :P

@@ -2,7 +2,8 @@ $body-max-width = 980px

$white = #fff

$node-green = #80bd01
$node-green = #43853d
$bright-green = #028a00
$light-green = #f1fbda
$hover-green = #d9ebb3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these two be updated with the new color guide?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look at where/how they are being used

makes on/hover states more consistent and fixes contrast on light backgrounds
@jrit
Copy link
Contributor Author

jrit commented Mar 1, 2016

Thanks all for your feedback. The suggestion to consolidate a few styles led me to consolidate some of the visuals as well so the active/hover/on states feel more consistent. I also fixed the contrast of green text on the light-green background. One other very minor change is adjusting the line-height and padding on the left navigation so when an item wraps, like "Technical Governance" it doesn't look like it is two separate links. Arrows on the below indicate hover states.

nodejs-foundation
downloads
nodejs-home

@stevemao @mikeal

@silverwind
Copy link
Contributor

Damn, I totally missed this PR. I almost filed my own PR with these changes:

-$node-green = #80bd01
-$light-green = #f1fbda
-$hover-green = #d9ebb3
+$node-green = #44883e
+$light-green = #e4f2e3
+$hover-green = #c0e0bd

And the download button hover:

     &:hover
-        background-color saturation($node-green, 80%)
+        background-color saturation($node-green, 60%)

What you might want to adapt is my $hover-green and $light-green which are different lightness shades of #44883e.

@silverwind
Copy link
Contributor

Oh, and disregard me, I should've read the changes first. Overall LGTM, except those platform logos which are still the old color. I'd convert these to SVG, but that can likely happen at a later point in time.

$node-green = #80bd01
$light-green = #f1fbda
$hover-green = #d9ebb3
$node-green = #43853d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not #44883e (http://rgb.to/pantone/7741-c)? I'd say it's good enough contrast.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that was the original spec color (correct me if I'm wrong) and it turned out to just barely not pass WCAG, which was actually the impetus for this PR originally. It is my hope in the future we can include WCAG validation as part of the site build process, so even the minor difference would cause a failure. Just taking care of the most important contrast differences for now, baby steps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, It's barely noticeable, so I don't have much of an opinion, but I'd lean on more the side of using the original color than to make it match the guideline.

@jrit
Copy link
Contributor Author

jrit commented Mar 2, 2016

@silverwind I agree about the platform icons on both color and file format. If you want to open a PR for that I bet it could just follow on this one being merged.

@silverwind
Copy link
Contributor

Filed #548 for SVG icons, they use $node-green.

@silverwind
Copy link
Contributor

And those SVGs are in master. I don't think you need to change anything in your PR, but best to double-check.

@jrit
Copy link
Contributor Author

jrit commented Mar 3, 2016

@silverwind made a small update to fill SVGs with white on hover as they were the same color as the background otherwise. Should be good now.

silverwind added a commit that referenced this pull request Mar 3, 2016
update node-green to pass WCAG AA
@silverwind silverwind merged commit 22b0b5e into nodejs:master Mar 3, 2016
@silverwind
Copy link
Contributor

Okay, merged. Should have squashed to commits in hindsight, hope it's fine.

@jrit jrit deleted the node-green branch March 3, 2016 17:02
@jrit
Copy link
Contributor Author

jrit commented Mar 3, 2016

Thank you!

@jrit
Copy link
Contributor Author

jrit commented Mar 3, 2016

I thought maybe https://nodejs.org/dist/latest-v5.x/docs/api/ would get updated, but that CSS lives somewhere else I guess. Do you know where that needs to be changed @silverwind ?

@silverwind
Copy link
Contributor

API is handled here: https://github.com/nodejs/node/blob/master/doc/api_assets/style.css

I'm preparing a pull request for it right now, but it will only get live on next release of each branch, unfortunately.

@jrit
Copy link
Contributor Author

jrit commented Mar 3, 2016

👍

@stevemao
Copy link
Contributor

stevemao commented Mar 5, 2016

The API docs are still using the old theme.

@jrit
Copy link
Contributor Author

jrit commented Mar 5, 2016

@stevemao see a couple comments above yours

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.

$node-green #80bd01 on white background does not pass accessible contrast ratio
6 participants