Core

Stepper

bande des étapes d'un parcours : les étapes faites se rouvrent

Options

Ce qui s’ajoute au HTML du composant, à combiner entre elles. Le HTML de chaque cas est dans les exemples dessous.

Étape en cours
aria-current="step"stepper__item--current un span : Marker Emphasis, libellé en couleur de marque, pas cliquable
Étape faite
stepper__item--done<button type="submit" form="…" name="Link" value="…" formnovalidate> Marker avec une coche, texte masqué « (terminée) » ; un bouton qui enregistre sans vérifier puis ouvre l’étape
Étape à venir
un span, en texte simple : on ne l’ouvre pas avant d’y être arrivé
Nom de la liste
aria-label="…" sur l’ol

Étape en cours

Une liste ordonnée (ol.stepper) : chaque étape est un li.stepper__item avec son repère et son libellé ; le trait entre deux étapes est dessiné par le CSS. L’étape en cours (span, aria-current="step") et les étapes à venir ne sont pas cliquables : le parcours avance par « Précédent » et « Suivant ». Pour des étapes en onglets en tête d’un Panel, voir Panel.

  1. Informations
  2. Motif
  3. Ajustement
  4. Validation
HTML
<ol class="stepper" aria-label="Étapes du plan">
  <li class="stepper__item stepper__item--current">
    <span class="stepper__step" aria-current="step">
      <span class="marker marker--xs marker--emphasis" aria-hidden="true">1</span>
      <span class="stepper__label">Informations</span>
    </span>
  </li>
  <li class="stepper__item">
    <span class="stepper__step">
      <span class="marker marker--xs" aria-hidden="true">2</span>
      <span class="stepper__label">Motif</span>
    </span>
  </li>
  <li class="stepper__item">
    <span class="stepper__step">
      <span class="marker marker--xs" aria-hidden="true">3</span>
      <span class="stepper__label">Ajustement</span>
    </span>
  </li>
  <li class="stepper__item">
    <span class="stepper__step">
      <span class="marker marker--xs" aria-hidden="true">4</span>
      <span class="stepper__label">Validation</span>
    </span>
  </li>
</ol>

Étapes faites

Une étape faite prend un repère à coche et le libellé en couleur de base ; avec une value, c’est un bouton d’envoi (type="submit", name="Link", value="…", formnovalidate) rattaché au formulaire du parcours par form="…" (la bande est hors du formulaire, comme les boutons du pied). Il enregistre ce qui est saisi sans le vérifier, puis ouvre l’étape demandée. Les noms du champ et des valeurs sont à confirmer avec le back.

  1. Ajustement
  2. Validation
HTML
<ol class="stepper" aria-label="Étapes du plan">
  <li class="stepper__item stepper__item--done">
    <button class="stepper__step" type="submit" form="plan" name="Link" value="informations" formnovalidate>
      <span class="marker marker--xs marker--done" aria-hidden="true"><svg class="icon icon--2xs" aria-hidden="true"><use href="/icons.svg#icon-check"></use></svg></span>
      <span class="stepper__label">Informations<span class="visually-hidden"> (terminée)</span></span>
    </button>
  </li>
  <li class="stepper__item stepper__item--done">
    <button class="stepper__step" type="submit" form="plan" name="Link" value="motif" formnovalidate>
      <span class="marker marker--xs marker--done" aria-hidden="true"><svg class="icon icon--2xs" aria-hidden="true"><use href="/icons.svg#icon-check"></use></svg></span>
      <span class="stepper__label">Motif<span class="visually-hidden"> (terminée)</span></span>
    </button>
  </li>
  <li class="stepper__item stepper__item--current">
    <span class="stepper__step" aria-current="step">
      <span class="marker marker--xs marker--emphasis" aria-hidden="true">3</span>
      <span class="stepper__label">Ajustement</span>
    </span>
  </li>
  <li class="stepper__item">
    <span class="stepper__step">
      <span class="marker marker--xs" aria-hidden="true">4</span>
      <span class="stepper__label">Validation</span>
    </span>
  </li>
</ol>

Dans un Panel

Posé dans une rangée du Panel (panel__row, Padding=Compact, Background=Subtle), sous l’en-tête de la page, quand le Panel porte déjà les onglets de la section.

  1. Motif
  2. Ajustement
  3. Validation
HTML
<div class="panel">
  <div class="panel__wrapper">
    <div class="panel__row panel__row--compact panel__row--subtle">
      <div class="panel__content">
        <ol class="stepper" aria-label="Étapes du plan">
          <li class="stepper__item stepper__item--done">
            <button class="stepper__step" type="submit" form="plan" name="Link" value="informations" formnovalidate>
              <span class="marker marker--xs marker--done" aria-hidden="true"><svg class="icon icon--2xs" aria-hidden="true"><use href="/icons.svg#icon-check"></use></svg></span>
              <span class="stepper__label">Informations<span class="visually-hidden"> (terminée)</span></span>
            </button>
          </li>
          <li class="stepper__item stepper__item--current">
            <span class="stepper__step" aria-current="step">
              <span class="marker marker--xs marker--emphasis" aria-hidden="true">2</span>
              <span class="stepper__label">Motif</span>
            </span>
          </li>
          <li class="stepper__item">
            <span class="stepper__step">
              <span class="marker marker--xs" aria-hidden="true">3</span>
              <span class="stepper__label">Ajustement</span>
            </span>
          </li>
          <li class="stepper__item">
            <span class="stepper__step">
              <span class="marker marker--xs" aria-hidden="true">4</span>
              <span class="stepper__label">Validation</span>
            </span>
          </li>
        </ol>
      </div>
    </div>
  </div>
</div>