Skip to content

Commit

Permalink
Fix contrast issue
Browse files Browse the repository at this point in the history
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
  • Loading branch information
paroxp committed Aug 7, 2018
1 parent d8e1dc2 commit 1792b44
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/layouts/_contrast-fix.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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]: https://github.com/alphagov/govuk-frontend/issues/944
:focus {
&, &:hover, &:link, &:visited, &:active {
color: #003A66;
}
}
2 changes: 2 additions & 0 deletions src/layouts/govuk.screen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

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

@import './contrast-fix';

.text-right {
text-align: right;
}
Expand Down

0 comments on commit 1792b44

Please sign in to comment.