<div class="wrapper">
  <ul class="list">
    <li class="list-item">
      <label class="my-checkbox">
        <input class="my-checkbox__input" type="checkbox" name="sample" value="b1">
        <span class="my-checkbox__icon"></span>
        <span class="my-checkbox__text">これらのチェックボックスには</span>
      </label>
    </li>
    <li class="list-item">
      <label class="my-checkbox">
        <input class="my-checkbox__input" type="checkbox" name="sample" value="2">
        <span class="my-checkbox__icon"></span>
        <span class="my-checkbox__text">フォーカスは当たるけど</span>
      </label>
    </li>
    <li class="list-item">
      <label class="my-checkbox">
        <input class="my-checkbox__input" type="checkbox" name="sample" value="3">
        <span class="my-checkbox__icon"></span>
        <span class="my-checkbox__text">フォーカスは見えません</span>
      </label>
    </li> 
  </ul>
</div>
$easeOutCirc: cubic-bezier(.075, .82, .165, 1);

.my-checkbox {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
}

.my-checkbox__input {
  /**
   * a11y-css-resetから引用
   * https://github.com/mike-engel/a11y-css-reset
  **/
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.my-checkbox__icon {
  display: inline-block;
  height: 1.5em;
  position: relative;
  width: 1.5em;

  &::before,
  &::after {
    content: '';
    position: absolute;
  }

  &::before {
    border: 2px solid #999;
    height: 100%;
    left: 0;
    top: 0;
    transition: border-color .5s, opacity .5s, transform .5s $easeOutCirc;
    width: 100%;

    // input[type=checkbox]がチェックされたとき
    .my-checkbox__input:checked + & {
      border-color: #779a75;
      opacity: 0;
      transform: rotate(45deg) scale3d(2, 2, 1);
      pointer-events: none; // クリッカブルな箇所が広がってしまうのでクリックを無効にする
    }
  }

  &::after {
    border-bottom: 2px solid transparent;
    border-left: 2px solid transparent;
    height: .5em;
    left: .25em;
    opacity: 0;
    top: .375em;
    transform: rotate(-225deg);
    transition: opacity .5s, transform .5s $easeOutCirc;
    width: 1em;

    // input[type=checkbox]がチェックされたとき
    .my-checkbox__input:checked + & {
      border-bottom: 2px solid #779a75;
      border-left: 2px solid #779a75;
      opacity: 1;
      transform: rotate(-45deg);
    }
  }
}

.my-checkbox__text {
  display: inline-block;
  letter-spacing: .01em;
  line-height: 1.5;
  position: relative;
  transition: color .3s;
  
  .my-checkbox__input:checked ~ & {
    color: #779a75;
  }
    
  @media(hover) {
    &:hover {
      color: #779a75;
    }
  }

  &::after {
    background-color: #999;
    bottom: -2px;
    content: '';
    display: inline-block;
    height: 2px;
    left: 0;
    position: absolute;
    transform: scale3d(0, 1, 1);
    transform-origin: right;
    transition: transform .3s;
    width: 100%;  
    
    @media(hover) {
      .my-checkbox:hover & {
        transform: scale3d(1, 1, 1);
        transform-origin: left;
      }
    }
  }

  .my-checkbox__icon + & {
    margin-left: 1em;
  }
}

//Setting

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  background: #f7f7f7;
  color: #3a3a3a;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
  padding: 5%;
}

.wrapper {
  margin: auto;
  max-width: 960px;
}

.list-item {
  & + & {
    margin-top: 1.5em;
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdn.jsdelivr.net/npm/focus-visible@5.1.0/dist/focus-visible.min.js