Skip to content

Commit

Permalink
WCAG 1.4.11: Adjust link focus color, so it has enough contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
otenav committed Apr 27, 2022
1 parent 70a5ab2 commit 44e8e0a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
20 changes: 20 additions & 0 deletions src/styles/link.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@import './variables';

.link {
.link();
}

.link() {
color: @primaryPurple;
font-family: 'Source Sans Pro', Arial, sans-serif;

&:focus {
outline: none;
color: #fff;
background: @blueDarken;
}

&:hover {
text-decoration-line: none;
}
}
2 changes: 1 addition & 1 deletion src/styles/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@import "../../node_modules/nav-frontend-paneler-style/src/index";
@import "../../node_modules/nav-frontend-skjema-style/src/index";
@import "../../node_modules/nav-frontend-grid-style/src/index";
@import "../../node_modules/@navikt/arbeidsplassen-core/less/link/link";
@import "../../node_modules/@navikt/arbeidsplassen-core/less/skjema/mixins";
@import "../../node_modules/@navikt/arbeidsplassen-core/less/panel/panel";
@import "../../node_modules/@navikt/arbeidsplassen-core/less/alertstripe/alertstripe";
Expand All @@ -14,6 +13,7 @@
@import "./header";
@import "./skiplink";
@import "./button";
@import "./link";

html, body {
height: 100%;
Expand Down
3 changes: 1 addition & 2 deletions src/views/ad/adText/AdText.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import (reference) "../../../styles/variables";
@import "../../../../node_modules/@navikt/arbeidsplassen-core/less/link/mixins";

@import (reference) "../../../styles/link";

.AdText {
background: #fff;
Expand Down
2 changes: 1 addition & 1 deletion src/views/ad/employerDetails/EmployerDetails.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import (reference) "../../../styles/variables";
@import "../../../../node_modules/@navikt/arbeidsplassen-core/less/link/mixins";
@import (reference) "../../../styles/link";

.EmployerDetails__h2 {
margin: 4rem 0 1rem;
Expand Down

0 comments on commit 44e8e0a

Please sign in to comment.