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 contrast issue #84

Merged
merged 1 commit into from
Aug 8, 2018
Merged

Fix contrast issue #84

merged 1 commit into from
Aug 8, 2018

Conversation

paroxp
Copy link
Member

@paroxp paroxp commented Aug 7, 2018

What

There is an issue, where all elements provided by the govuk-frontend will
have a yellow background set on :focus. It's particularly affecting links,
buttons and summary boxes. These elements also have a blue text in them,
which could cause difficulty to our users when it comes to reading the
content. It means we don't meet the required WCAG 2 AA standard 1.

Design system team thinks the roll out may take a long time, due to the
nature of it being used in the wide government and have no issues with
us overriding it with the provided black colour.

This is only a temporary solution and should be reverted back once the
issue upstream is resolved. 2

How to review

  • See if change makes sense
  • Run the application and play around to see if nothing is negatively affected
  • Run a standards check with the colours

@carolinegreen carolinegreen self-requested a review August 7, 2018 14:01
@carolinegreen carolinegreen self-assigned this Aug 7, 2018
@carolinegreen carolinegreen removed their request for review August 7, 2018 14:01
Copy link

@carolinegreen carolinegreen left a comment

Choose a reason for hiding this comment

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

Nice you've prioritised fixing this fast. :) I would say with the Design System, although we're using it, it's not specifically aimed at us, so we shouldn't let it block us from things. It is good to check though we're not duplicating work.

I'm not entirely sure about the black text, as I think we're losing some of the visual meaning of the highlights. I found it a bit jarring when I looked at it, as it can make it seem as if the text has switched to not longer being a link. Making the text black like all the non-link text might accidentally be conferring a meaning we don't want to this text.

We don't currently have a blue dark enough from the palette of colours on the design system, but we could add our own darker blue.

I've taken screenshots:

Original low contrast text:
screen shot 2018-08-07 at 15 12 46

Black text:
screen shot 2018-08-07 at 15 10 46

Proposed blue text #003A66 - This colour exceeds the WCAG 2 AA standard and also reaches WCAG 2 AAA standard:
screen shot 2018-08-07 at 15 22 33

@@ -17,6 +17,8 @@

@import '../components/statements/statements';

@import './tmp';

Choose a reason for hiding this comment

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

I think we should call this colour contrast so we don't forget what it is. In my experience, temporary things often aren't very temporary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair.

@carolinegreen carolinegreen removed their assignment Aug 7, 2018
@paroxp
Copy link
Member Author

paroxp commented Aug 7, 2018

Nice touch, love it. Id be vary of adding new colours to the palette though. Before I go ahead changing it, don't you think we should stick to "3 colour" rule? :D

Happy either way.

@carolinegreen
Copy link

I think the three colour rule came from consolidating colours, and at one point there were more colours. I think too, that patterns are meant to evolve and the current ones aren't meeting our needs. If we call the colour variable something sensible and we have the explanation next to it, it should be okay.

@paroxp paroxp force-pushed the fix-contrast-issue branch from ce1fce4 to 1792b44 Compare August 8, 2018 07:48
@paroxp
Copy link
Member Author

paroxp commented Aug 8, 2018

Addressed.

I didn't make it a variable, as I hear naming things makes it harder to get rid of the thing. People get attached and stuff.

@carolinegreen
Copy link

Haha, I think naming it would be better as otherwise we are more likely to end up with arbitrary colours.

There is an issue, where all elements provided by the govuk-frontend will
have a yellow background set on :focus. It's particularly affecting links,
buttons and summary boxes. These elements also have a blue text in them,
which could cause difficulty to our users when it comes to reading the
content. It means we don't meet the required WCAG 2 AA standard [1].

Design system team thinks the roll out may take a long time, due to the
nature of it being used in the wide government and have no issues with
us overriding it with the provided black colour.

This is only a temporary solution and should be reverted back once the
issue upstream is resolved. [2]

[1]: https://snook.ca/technical/colour_contrast/colour.html#fg=005EA5,bg=FFBF47
[2]: alphagov/govuk-frontend#944
@paroxp paroxp force-pushed the fix-contrast-issue branch from 1792b44 to 6a007a7 Compare August 8, 2018 14:39
@paroxp
Copy link
Member Author

paroxp commented Aug 8, 2018

Fine. Readability - I'm all up for it.

@carolinegreen
Copy link

Thanks :).

@carolinegreen carolinegreen merged commit f38a644 into master Aug 8, 2018
@carolinegreen carolinegreen deleted the fix-contrast-issue branch August 14, 2018 14:21
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