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

HTML Reporter: Increase contrast and use richer colors overall #1587

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

Krinkle
Copy link
Member

@Krinkle Krinkle commented Apr 10, 2021

Tweak our colors away from the semi-greyish colors we had before,
toward more dark/saturated or bright colors.

Also reduce the overall number of distinct colors, reusing the same
ones more often.

  • Change most uses of black (#000000) to #0D3349, which is the very dark blue we already used for the #qunit-header background.

  • Change text in #qunit .pass from #528CE0 to #2F68DA, this is more saturated and appears darker. I also moved its hue slightly from cyan-blue, more toward blue-violet.

  • Change the text color for #qunit-testresult from #3B81AF to the same dark blue as used for module names, #366097. The color previously used here was a medium blue that we didn't use for any other text.

  • Change the Rerun link from the near-invisible #C2CCD1 to instead inherit the text color of #qunit .pass or #qunit .fail, e.g. #2F68DA. Also, to make it still stand out as special, add an underline. It retains its liberal padding for easy clickability.

Clean up:

  • Remove unused color value for #qunit-header. Instead set it to that of #qunit-header a (it only contains a link), and let the latter inherit this color.
  • Replace redundant #qunit-tests .fail .test-name and and #qunit-tests .fail .module-name styles.
Before After
01-before 02-after

Ref #1427.

@smcclure15
Copy link
Member

New CSS looks reasonable, and I like the look of the newly styled report!
Does this check off a few more violations from what Axe caught regarding contrast? Either way, a worthwhile improvement.

Tweak our colors away from the semi-greyish colors we had before,
toward more dark/saturated or bright colors.

Also reduce the overall number of distinct colors, reusing the same
ones more often.

* Change most uses of black (`#000000`) to `#0D3349`, which is the
  very dark blue we already used for the `#qunit-header` background.

* Change text in `#qunit .pass` from `#528CE0` to `#2F68DA`,
  this is more saturated and appears darker. I also moved its hue
  slightly from cyan-blue, more toward blue-violet.

* Change the text color for `#qunit-testresult` from `#3B81AF` to
  the same dark blue as used for module names, `#366097`. The color
  previously used here was a medium blue that we didn't use for any
  other text.

* Change the Rerun link from the near-invisible `#C2CCD1` to instead
  inherit the text color of `#qunit .pass` or `#qunit .fail`, e.g.
  `#2F68DA`. Also, to make it still stand out as special, add an
  underline. It retains its liberal padding for easy clickability.

Clean up:

* Remove unused color value for `#qunit-header`. Instead set it to that
  of `#qunit-header a` (it only contains a link), and let the latter
  inherit this color.

* Replace redundant `#qunit-tests .fail .test-name` and
  and `#qunit-tests .fail .module-name ` styles.

Ref qunitjs#1427.
@Krinkle
Copy link
Member Author

Krinkle commented Apr 14, 2021

@smcclure15 Yeah, it gets us closer to Axe compliance.

I carved this commit out from an experimental branch I have in my fork with some ideas for a bigger redesign:

https://github.com/Krinkle/qunit/commits/qunit3-theme
https://twitter.com/TimoTijhof/status/1381829404725219328

@Krinkle Krinkle merged commit 7129fe5 into qunitjs:main Apr 14, 2021
@Krinkle Krinkle deleted the html-a11y branch April 27, 2021 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants