Skip to content

Commit

Permalink
fix: accessibility
Browse files Browse the repository at this point in the history
* delete `visibility: hidden;`
* set 1px height and width to radio and checkbox
* set background color
  • Loading branch information
kyu-suke committed Jun 30, 2019
1 parent 1f33685 commit 3c2e25a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion scss/form/checkboxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
visibility: hidden;

background: $color-white;
width: 1px;
height: 1px;
border: 0;
& + span {
position: relative;
cursor: $cursor-click-url, pointer;
Expand Down Expand Up @@ -83,6 +86,7 @@
@include pixelize(2px, $checkbox-checked-focus, $colors);
}
&.is-dark {
background: $base-color;
+ span {
color: $color-white;
}
Expand Down
7 changes: 6 additions & 1 deletion scss/form/radios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
visibility: hidden;

background: $color-white;
width: 1px;
height: 1px;
border: 0;

& + span {
position: relative;
Expand All @@ -53,6 +57,7 @@
@include pixelize(2px, $radio-checked-focus, $colors);
}
&.is-dark {
background: $base-color;
+ span {
color: $color-white;
}
Expand Down

0 comments on commit 3c2e25a

Please sign in to comment.