FRENVersion française

In-page navigation

Dot navigation

Navigation par points

Demo

Loading demo…

A column of small dots pinned to the edge of the screen, one dot per section. The filled dot shows the visible section, and a click takes you there. It mostly shows up on pages made of full-screen sections, where a text table of contents would take too much room.

Story

Did you know

These are the same dots you see under a carousel or on a phone's home screen, just turned vertical. 2010s landing pages picked them up when single-page sites cut into full screens became fashionable.

Timeline

  1. 2000sPagination dots on slideshows and mobile home screens make the pattern familiar.
  2. 2010sOne-page sites and libraries such as fullPage.js stand the dots up vertically along the edge of the screen.

Vocabulary

Names

FR
Navigation par points, navigation à points, points de navigation, pagination verticale
EN
Dot navigation, dot nav, side dots, section dots, vertical pagination, one-page navigation

Common uses

  • Landing pages made of full-screen sections
  • Product pages: one section per feature
  • Scroll-based stories and presentations
  • Single-page portfolios

Code

<nav aria-label="Page sections" class="dots">
  <a href="#intro"><span class="label">Intro</span></a>
  <a href="#features"><span class="label">Features</span></a>
  <a href="#pricing"><span class="label">Pricing</span></a>
</nav>

<script>
  const links = document.querySelectorAll('.dots a')
  // The active section is the one crossing the middle of the viewport
  const io = new IntersectionObserver((entries) => {
    for (const e of entries) {
      if (!e.isIntersecting) continue
      for (const a of links) {
        if (a.hash === '#' + e.target.id) a.setAttribute('aria-current', 'true')
        else a.removeAttribute('aria-current')
      }
    }
  }, { rootMargin: '-50% 0px' })
  document.querySelectorAll('section[id]').forEach((s) => io.observe(s))
</script>

<style>
  .dots { position: fixed; right: 1rem; top: 50%; translate: 0 -50%; display: grid; }
  /* 24px hit area, 10px dot */
  .dots a { position: relative; display: grid; place-items: center; width: 24px; height: 24px; }
  .dots a::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; }
  .dots a[aria-current]::before { background: currentColor; }
  .label { position: absolute; right: 100%; white-space: nowrap; opacity: 0; }
  .dots a:is(:hover, :focus-visible) .label { opacity: 1; }
</style>

Good to know

  • With rootMargin: '-50% 0px', the observed area shrinks to a line across the middle of the screen. Whichever section crosses it is active, however tall it is.
  • The dots float over sections with very different backgrounds. Give them both a light and a dark ring (two box-shadows) so they stay visible everywhere.
  • For the "one section per screen" effect, set scroll-snap-type: y proximity on the container instead of a script that hijacks the wheel. Scrolling stays native, with keyboard and trackpad alike.
  • Past seven or eight dots, nobody can tell which is which. Switch to a text table of contents instead.

Accessibility

Must have

  • Each dot is a link with an accessible name: the section title as text (visually hidden if needed) or aria-label. A title attribute or a hover tooltip is not enough.
  • Mark the active dot with aria-current="true", and show it with more than colour: filled versus outlined, or bigger (WCAG 1.4.1).
  • A target of at least 24 × 24 px (WCAG 2.5.8), even if the drawn dot is 10 px: enlarge the link, not the dot.

Often forgotten

  • Show the label on :focus-visible, not only on :hover. Keyboards and fingers don't hover.
  • Inactive dots also need 3:1 contrast against every section background (WCAG 1.4.11). Pale grey vanishes on a photo.
  • Give the <nav> a name distinct from the main menu, for example aria-label="Page sections".

Nice to have

  • Add the position as visually hidden text ("2 of 5") in each link, for people who can't see the column.
  • Only turn on scroll-behavior: smooth inside @media (prefers-reduced-motion: no-preference).

Who uses it