<a class="skip" href="#main">メインコンテンツへスキップする</a>
<header class="header" role="banner">
    <h1>スキップリンク</h1>
    <nav>
      <h2 class="visually-hidden">メニュー</h2>
        <ul>
          <li><a href="#">リンク1</a></li>
          <li><a href="#">リンク2</a></li>
          <li><a href="#">リンク3</a></li>
        </ul>
    </nav>
</header>
<main class="main" id="main">
  <h2>メインコンテンツ</h2>
  <p>本文テキスト</p>
  <p>本文テキスト</p>
  <p>本文テキスト</p>
</main>
.skip {
  border-width: 0;
  display: block;
  font-size: 0;
  height: 1px;
  line-height: 0;
  position: relative;
  transition: all 0.3s ease;
  width: 100%;
}
.skip:focus {
  font-size: 1em;
  height: 44px;
  line-height: 44px;
  position: static;
  text-decoration: underline;
}
.visually-hidden{
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin:0;
  overflow: hidden;
  padding:0;
  position: absolute;
  white-space: nowrap
  width: 1px;
}
.header{
  background-color: #eef;
  height: 100vh;
}
.main{
  background-color: #efe;
  height: 100vh;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.