Content
Steps
A few numbered things to do, in order, each with an icon, a short title and one sentence.
When to use
- To say what to do in an emergency: “Move to higher ground”.
- To explain how a service works before people start: “Check you can apply, apply online, pay, get your licence”.
When not to use
- For more than 6 steps: use a numbered list in prose.
- For what the institution will do next: use a timeline.
- For things that can be done in any order: use a bulleted list or cards.
How to use
- Use 3 to 6 steps. Start each title with a verb: “Switch off the electricity”.
- Keep each to one short sentence under the title.
- Choose icons that match the words; the words must work without them.
- Add
ggds-steps--urgentfor an emergency, with an urgent notice or a page heading in red above. - Give the list a heading above it, such as “What to do now”, and make each title a heading one level below.
Do
- Start each title with a verb.
- Put the most urgent step first.
Don't
- Use steps for decoration or marketing.
Accessibility
What GGDS does
- It is an ordered list: screen readers say how many steps there are and which one they are on (WCAG 1.3.1).
- The large numbers and the urgent colours have at least 4.5 to 1 contrast. The icons are hidden from screen readers.
- Steps sit side by side on wide screens and one under another on phones, in the same order (WCAG 1.3.2).
What you need to do
- Make each title a heading at the right level for the page.
- Do not put links or buttons only in the icons.
Example: What to do now
<h2>What to do now</h2>
<ol class="ggds-steps ggds-steps--urgent">
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M12 19V5M6 11l6-6 6 6"/></svg></span>
<h3 class="ggds-steps__title">Move to higher ground</h3>
<p>Take your family, your Ghana Card and your medicines.</p>
</li>
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M13 2 4 14h7l-1 8 9-12h-7z"/></svg></span>
<h3 class="ggds-steps__title">Switch off the electricity</h3>
<p>At the main switch, if it is safe to reach.</p>
</li>
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="8.5"/><path d="M6 6l12 12"/></svg></span>
<h3 class="ggds-steps__title">Do not cross flood water</h3>
<p>Not on foot and not by car.</p>
</li>
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect x="7" y="2" width="10" height="20" rx="2"/><path d="M11 18h2"/></svg></span>
<h3 class="ggds-steps__title">Keep your phone charged</h3>
<p>We will send updates by SMS and on radio.</p>
</li>
</ol><>
<h2>What to do now</h2>
<ol className="ggds-steps ggds-steps--urgent">
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><path d="M12 19V5M6 11l6-6 6 6" /></svg></span>
<h3 className="ggds-steps__title">Move to higher ground</h3>
<p>Take your family, your Ghana Card and your medicines.</p>
</li>
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><path d="M13 2 4 14h7l-1 8 9-12h-7z" /></svg></span>
<h3 className="ggds-steps__title">Switch off the electricity</h3>
<p>At the main switch, if it is safe to reach.</p>
</li>
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="8.5" /><path d="M6 6l12 12" /></svg></span>
<h3 className="ggds-steps__title">Do not cross flood water</h3>
<p>Not on foot and not by car.</p>
</li>
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><rect x="7" y="2" width="10" height="20" rx="2" /><path d="M11 18h2" /></svg></span>
<h3 className="ggds-steps__title">Keep your phone charged</h3>
<p>We will send updates by SMS and on radio.</p>
</li>
</ol>
</>Example: How it works
<h2>How it works</h2>
<ol class="ggds-steps">
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12.5 4.5 4.5L19 7"/></svg></span>
<h3 class="ggds-steps__title">Check you can apply</h3>
<p>You need a Ghana Card and a registered canoe.</p>
</li>
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M4 20h4L19 9l-4-4L4 16z"/><path d="m13.5 6.5 4 4"/></svg></span>
<h3 class="ggds-steps__title">Apply online</h3>
<p>It takes about 10 minutes.</p>
</li>
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect x="3" y="6" width="18" height="12" rx="1.5"/><path d="M3 10h18M7 15h3"/></svg></span>
<h3 class="ggds-steps__title">Pay GH₵ 250</h3>
<p>By mobile money or bank card.</p>
</li>
<li class="ggds-steps__item">
<span class="ggds-steps__icon"><svg class="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M6 3h8l4 4v14H6z"/><path d="M14 3v4h4"/><path d="m9 14 2 2 4-4"/></svg></span>
<h3 class="ggds-steps__title">Get your licence</h3>
<p>By SMS, within 10 working days.</p>
</li>
</ol><>
<h2>How it works</h2>
<ol className="ggds-steps">
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><path d="m5 12.5 4.5 4.5L19 7" /></svg></span>
<h3 className="ggds-steps__title">Check you can apply</h3>
<p>You need a Ghana Card and a registered canoe.</p>
</li>
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><path d="M4 20h4L19 9l-4-4L4 16z" /><path d="m13.5 6.5 4 4" /></svg></span>
<h3 className="ggds-steps__title">Apply online</h3>
<p>It takes about 10 minutes.</p>
</li>
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><rect x="3" y="6" width="18" height="12" rx="1.5" /><path d="M3 10h18M7 15h3" /></svg></span>
<h3 className="ggds-steps__title">Pay GH₵ 250</h3>
<p>By mobile money or bank card.</p>
</li>
<li className="ggds-steps__item">
<span className="ggds-steps__icon"><svg className="ggds-icon ggds-icon--lg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><path d="M6 3h8l4 4v14H6z" /><path d="M14 3v4h4" /><path d="m9 14 2 2 4-4" /></svg></span>
<h3 className="ggds-steps__title">Get your licence</h3>
<p>By SMS, within 10 working days.</p>
</li>
</ol>
</>Use it
- Stylesheet
ggds.cssincludes it. To load only the parts you use:core.css, thencomponents/steps.css(0.5 KB with gzip, minified).- JavaScript
- None needed.
HTML
Copy the HTML under each example above. It works in any website.
Astro
No Astro component: copy the HTML.
React and Next.js
With @ggds/react:
import { Steps } from '@ggds/react';
<Steps urgent steps={[
{ icon: 'arrow-up', title: 'Move to higher ground', text: 'Take your family, your Ghana Card and your medicines.' },
{ icon: 'energy', title: 'Switch off the electricity', text: 'At the main switch, if it is safe to reach.' },
]} />Django
With ggds-django ({% load ggds %}):
{# steps: dicts with icon, title and text #}
{% ggds_steps steps urgent=True %}Classes and states
| Class | What it does |
|---|---|
.ggds-steps | The steps: an <ol>, side by side where they fit. |
.ggds-steps--urgent | For an emergency: the danger colours. |
.ggds-steps__item | One step: an <li>, with its number drawn large. |
.ggds-steps__icon | The icon, in a circle. |
.ggds-steps__title | What to do: a heading. |
Accessibility tests
Automated, on every change
These run each time GGDS changes. A change that fails one is not accepted.
- WCAG 2.2 A and AA rules (axe), at desktop and phone widths, on every example
- No sideways scrolling on a 320px screen, also with a wide font, on every example
- Every approved colour pair meets its contrast minimum, for every institution theme
- No inline scripts or styles, so it runs under a strict Content Security Policy
By people, with assistive technology
Automated tests find only some of the barriers people meet. These checks are still to be done.
| Check | Result | Notes |
|---|---|---|
| Keyboard only | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| NVDA screen reader with Firefox or Chrome (Windows) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| JAWS screen reader with Chrome (Windows) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| VoiceOver screen reader with Safari (iPhone) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| TalkBack screen reader with Chrome (Android) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| Zoom to 400%, and increased text spacing | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| Windows contrast themes (forced colours) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
| Voice control (Voice Access or Dragon) | Not tested yet | Waiting for the external audit with disabled people (decision D-09). |
Changes
| Version | Change |
|---|---|
| 0.3.0 | New: steps, 3 to 6 numbered things to do, each with an icon; ggds-steps--urgent for an emergency. |
| 0.1.0 | Added. |
Related components
Something wrong, unclear or missing? or suggest a change to it on GitHub. You need a GitHub account.