Skip to content

Timeline

A sequence of dated events, read as one history.

Preview

Code

The three render the same class names, the same ARIA and the same data attributes. That is checked when this site builds: a class in any of these samples that neither the markup contract nor the shipped stylesheet defines fails the build.

<ol class="wsu-timeline">
  <li class="wsu-timeline__item">
    <span class="wsu-timeline__marker" aria-hidden="true"></span>
    <time class="wsu-timeline__time" datetime="2026-10-13">Oct 13</time>
    <p class="wsu-timeline__title">Priority registration opened</p>
  </li>
  <li class="wsu-timeline__item">
    <span class="wsu-timeline__marker" aria-hidden="true"></span>
    <time class="wsu-timeline__time" datetime="2027-11-08">Nov 8</time>
    <p class="wsu-timeline__title">Registration closes</p>
  </li>
</ol>

Why it works this way

  • An <ol>, because the order is the information (1.3.2): reordering these entries changes what happened when. Each item is a real list item with a real time element, not a styled div, so the dates it carries are machine readable as well as visible.
  • The marker dot is a generated, aria-hidden span. The date and title beside it already say everything the dot would otherwise stand in for.
  • Not the same job as a step in a process still under way. A timeline is a record of what already happened, so the two never share a marker class.

Accessibility

  • An ordered list, so position and count are announced (1.3.2).
  • time carries the machine-readable datetime; the marker is decorative and aria-hidden (1.1.1).

Success criteria in brackets refer to WCAG 2.2. Every one of them is checked by axe-core in both themes at three viewport widths before this page can be published. See Accessibility for what the gates are.

Props

Blade

AttributeDefaultWhat it does
items[][{ time, datetime, title }]. datetime is the machine-readable ISO value.

Vue

PropType and defaultWhat it does
itemsArray, [][{ time, datetime, title }]. datetime is the machine-readable ISO value.

In the markup contract

contract/markup-contract.json is extracted from the two static templates and every package tests against it. This is what it records for .wsu-timeline.

TemplateElementsAccessibility attributesUses
internal apps/examples/static-html/index.htmlolnone recorded1
public apps/examples/static-html/public-app.htmlolnone recorded1