Skip to content

Commit

Permalink
Focus visibility
Browse files Browse the repository at this point in the history
* Checkboxes
  • Loading branch information
zoglo committed Oct 31, 2024
1 parent e1084c7 commit c77d167
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/framework/scss/ctm_base/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@

--cbx-bdr-clr:#{$form-checkbox-radio-border-color};
--cbx-bdr-clr-hvr:#{$form-checkbox-radio-border-color-hover};

// A11y
--focus-clr: var(--clr-primary);
--focus-style: 3px dotted var(--focus-clr);
--focus-offset: 2px;
}

// Typography
Expand Down
8 changes: 8 additions & 0 deletions public/framework/scss/ctm_components/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,14 @@ $form-checkbox-radio-label-min-height: $form-checkbox-radio-size;
background-color: $form-checkbox-radio-background-focus;
}
}

&:focus-visible + label {

&:before {
outline: var(--focus-style);
outline-offset: var(--focus-offset);
}
}
}

// Checkbox radio container
Expand Down

0 comments on commit c77d167

Please sign in to comment.