Accessibility: outline links to ease keyboard navigation

This commit is contained in:
simon lehericey 2019-11-14 09:22:02 +01:00
parent 111e7509c1
commit efd35a3de7
5 changed files with 24 additions and 5 deletions

View file

@ -1,3 +1,4 @@
@import "colors";
@import "constants"; @import "constants";
%horizontal-list { %horizontal-list {
@ -17,3 +18,10 @@
animation-fill-mode: forwards; animation-fill-mode: forwards;
animation-duration: 0.3s; animation-duration: 0.3s;
} }
%outline {
&:active,
&:focus {
outline: 3px solid $blue;
}
}

View file

@ -1,7 +1,10 @@
@import "colors"; @import "colors";
@import "constants"; @import "constants";
@import "placeholders";
.button { .button {
@extend %outline;
display: inline-block; display: inline-block;
padding: 8px 16px; padding: 8px 16px;
border-radius: 30px; border-radius: 30px;
@ -20,11 +23,6 @@
text-decoration: none; text-decoration: none;
} }
&:active,
&:focus {
outline: none;
}
&:disabled { &:disabled {
opacity: 0.5; opacity: 0.5;
filter: saturate(50%); filter: saturate(50%);

View file

@ -1,3 +1,6 @@
@import "colors";
@import "placeholders";
html, html,
body { body {
height: 100%; height: 100%;
@ -14,5 +17,7 @@ html {
} }
a { a {
@extend %outline;
text-decoration: none; text-decoration: none;
} }

View file

@ -1,5 +1,6 @@
@import "constants"; @import "constants";
@import "colors"; @import "colors";
@import "placeholders";
.form { .form {
h1 { h1 {
@ -177,6 +178,8 @@
input[type=checkbox], input[type=checkbox],
input[type=radio] { input[type=radio] {
@extend %outline;
margin-left: 5px; margin-left: 5px;
margin-right: 4px; margin-right: 4px;
margin-bottom: 2 * $default-padding; margin-bottom: 2 * $default-padding;

View file

@ -365,6 +365,11 @@ $cta-panel-button-border-size: 2px;
color: #FFFFFF; color: #FFFFFF;
text-decoration: none; text-decoration: none;
} }
&:active,
&:focus {
outline: 3px solid #FFFFFF;
}
} }
.cta-panel-button-blue { .cta-panel-button-blue {