Skip to main content

This is a draft (version 0.5.0). The National Information Technology Agency (NITA) plans to make GGDS official guidance for government websites after independent accessibility testing. What this means

Ghana Government Design System Design system for Government of Ghana websites – home Search

Forms

Task list

The sections of a long application with the status of each, so people can do them in any order and come back later.

When to use

  • For an application that takes more than one sitting, or has sections people can do in any order, such as a licence or a permit with several documents to upload.
  • When people need to see what is left before they can send it.

When not to use

  • For a short form that people finish in one go. Ask one question per page, with progress if it helps.
  • To show the stages of something your institution does after people apply. Use a timeline.

How to use

  • Put the summary first: "You have completed 2 of 5 sections." Then the list, then a button to check answers and send, once every section is complete.
  • Name each section by what people do or give: "Your details", "Upload your documents", "Pay the fee".
  • Give each section one status, as text: Completed, In progress, Not started or Cannot start yet. Use the tag colours as in the example. Only completed is green.
  • Link every section people can open. A section that cannot start yet (such as paying before the details are done) has no link, and its hint says why.
  • Give each link aria-describedby naming its status, so screen readers hear "Your details, Completed".
  • Save each section as people finish it, so they can leave and come back.

Accessibility

What GGDS does

  • The whole row is the target, at least 44px tall, while the link text stays the link's name.
  • Status is in words, never colour alone.

What you need to do

  • Link each section's status to its link with aria-describedby.
  • Keep the summary up to date: it is the first thing people read when they come back.

Example: An application in sections

Open this example on its own page

HTML code for “An application in sections”
HTML
<h1>Apply for a fishing licence</h1>
<p class="ggds-task-list__summary">You have completed 2 of 5 sections.</p>
<ol class="ggds-task-list">
  <li class="ggds-task-list__item ggds-task-list__item--link">
    <div class="ggds-task-list__name"><a class="ggds-task-list__link" href="#details" aria-describedby="task-details-status">Your details</a></div>
    <div class="ggds-task-list__status" id="task-details-status"><strong class="ggds-tag ggds-tag--success">Completed</strong></div>
  </li>
  <li class="ggds-task-list__item ggds-task-list__item--link">
    <div class="ggds-task-list__name"><a class="ggds-task-list__link" href="#canoe" aria-describedby="task-canoe-status">About your canoe</a></div>
    <div class="ggds-task-list__status" id="task-canoe-status"><strong class="ggds-tag ggds-tag--success">Completed</strong></div>
  </li>
  <li class="ggds-task-list__item ggds-task-list__item--link">
    <div class="ggds-task-list__name"><a class="ggds-task-list__link" href="#documents" aria-describedby="task-documents-hint task-documents-status">Upload your documents</a><p class="ggds-task-list__hint" id="task-documents-hint">Your Ghana Card and a photo of the canoe</p></div>
    <div class="ggds-task-list__status" id="task-documents-status"><strong class="ggds-tag ggds-tag--info">In progress</strong></div>
  </li>
  <li class="ggds-task-list__item ggds-task-list__item--link">
    <div class="ggds-task-list__name"><a class="ggds-task-list__link" href="#landing" aria-describedby="task-landing-status">Your landing beach</a></div>
    <div class="ggds-task-list__status" id="task-landing-status"><strong class="ggds-tag">Not started</strong></div>
  </li>
  <li class="ggds-task-list__item">
    <div class="ggds-task-list__name">Pay the fee<p class="ggds-task-list__hint" id="task-pay-hint">You can pay once the other sections are complete</p></div>
    <div class="ggds-task-list__status ggds-task-list__status--cannot-start" id="task-pay-status">Cannot start yet</div>
  </li>
</ol>
JSX (React)
<>
  <h1>Apply for a fishing licence</h1>
  <p className="ggds-task-list__summary">You have completed 2 of 5 sections.</p>
  <ol className="ggds-task-list">
    <li className="ggds-task-list__item ggds-task-list__item--link">
      <div className="ggds-task-list__name"><a className="ggds-task-list__link" href="#details" aria-describedby="task-details-status">Your details</a></div>
      <div className="ggds-task-list__status" id="task-details-status"><strong className="ggds-tag ggds-tag--success">Completed</strong></div>
    </li>
    <li className="ggds-task-list__item ggds-task-list__item--link">
      <div className="ggds-task-list__name"><a className="ggds-task-list__link" href="#canoe" aria-describedby="task-canoe-status">About your canoe</a></div>
      <div className="ggds-task-list__status" id="task-canoe-status"><strong className="ggds-tag ggds-tag--success">Completed</strong></div>
    </li>
    <li className="ggds-task-list__item ggds-task-list__item--link">
      <div className="ggds-task-list__name"><a className="ggds-task-list__link" href="#documents" aria-describedby="task-documents-hint task-documents-status">Upload your documents</a><p className="ggds-task-list__hint" id="task-documents-hint">Your Ghana Card and a photo of the canoe</p></div>
      <div className="ggds-task-list__status" id="task-documents-status"><strong className="ggds-tag ggds-tag--info">In progress</strong></div>
    </li>
    <li className="ggds-task-list__item ggds-task-list__item--link">
      <div className="ggds-task-list__name"><a className="ggds-task-list__link" href="#landing" aria-describedby="task-landing-status">Your landing beach</a></div>
      <div className="ggds-task-list__status" id="task-landing-status"><strong className="ggds-tag">Not started</strong></div>
    </li>
    <li className="ggds-task-list__item">
      <div className="ggds-task-list__name">Pay the fee<p className="ggds-task-list__hint" id="task-pay-hint">You can pay once the other sections are complete</p></div>
      <div className="ggds-task-list__status ggds-task-list__status--cannot-start" id="task-pay-status">Cannot start yet</div>
    </li>
  </ol>
</>

Use it

Stylesheet
ggds.css includes it. To load only the parts you use: core.css, then components/task-list.css (0.5 KB with gzip, minified).
JavaScript
None needed.

HTML

Copy the HTML under each example above. It works in any website.

Astro

With @ggds/astro:

JavaScript
import TaskList from '@ggds/astro/TaskList.astro';

---
import TaskList from '@ggds/astro/TaskList.astro';
---
<TaskList tasks={[
  { label: 'Your details', href: '/apply/details/', status: 'completed' },
  { label: 'Pay the fee', status: 'cannotStart', hint: 'You can pay once the other sections are complete' },
]} />

React and Next.js

With @ggds/react:

JavaScript
import { TaskList } from '@ggds/react';

<TaskList tasks={[
  { label: 'Your details', href: '/apply/details/', status: 'completed' },
  { label: 'Upload your documents', href: '/apply/documents/', status: 'inProgress' },
  { label: 'Pay the fee', status: 'cannotStart', hint: 'You can pay once the other sections are complete' },
]} />   {/* "You have completed 1 of 3 sections." */}

Django

With ggds-django ({% load ggds %}):

Django template
{% load ggds %}
{% ggds_task_list tasks %}  {# [{"label", "href", "status": "completed" | "inProgress" | "notStarted" | "cannotStart", "hint"}] #}

Classes and states

Classes for task list
ClassWhat it does
.ggds-task-list__summaryHow many sections are complete, above the list.
.ggds-task-listThe list of sections, in an <ol>.
.ggds-task-list__itemOne section: its name and its status.
.ggds-task-list__item--linkA section people can open: the whole row is the target.
.ggds-task-list__nameThe section's name, as a link when people can open it, and its hint.
.ggds-task-list__linkThe link to the section. Its aria-describedby names the status.
.ggds-task-list__hintExtra help under the name, such as why a section cannot start yet.
.ggds-task-list__statusThe status: a tag, or plain text for a section that cannot start yet.
.ggds-task-list__status--cannot-startThe muted text of a section people cannot open yet.
States of task list
StateWhat it does
:hoverThe row's background turns grey.

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
  • Behaviour test: “task list: the whole row opens the section, and screen readers hear its status”

By people, with assistive technology

Automated tests find only some of the barriers people meet. These checks are still to be done.

Manual accessibility checks for task list
CheckResultNotes
Keyboard onlyNot tested yetWaiting for the external audit with disabled people (decision D-09).
NVDA screen reader with Firefox or Chrome (Windows)Not tested yetWaiting for the external audit with disabled people (decision D-09).
JAWS screen reader with Chrome (Windows)Not tested yetWaiting for the external audit with disabled people (decision D-09).
VoiceOver screen reader with Safari (iPhone)Not tested yetWaiting for the external audit with disabled people (decision D-09).
TalkBack screen reader with Chrome (Android)Not tested yetWaiting for the external audit with disabled people (decision D-09).
Zoom to 400%, and increased text spacingNot tested yetWaiting for the external audit with disabled people (decision D-09).
Windows contrast themes (forced colours)Not tested yetWaiting for the external audit with disabled people (decision D-09).
Voice control (Voice Access or Dragon)Not tested yetWaiting for the external audit with disabled people (decision D-09).

Changes

Changes to task list, newest first
VersionChange
0.4.0New components for services that take people from start to payment, in HTML, React, Astro and Django, each checked element by element against its documentation example and with axe on phones and computers. All are alpha.
0.1.0Added.

Every change, in What’s new

  • Summary list

    Questions and answers, or labels and values, as a list, with links to change them. For "Check your answers" pages and records.

  • Tag

    A short label that shows a status, such as "Open" or "Closed".

  • Progress

    Shows people how far through a task they are, such as “Question 3 of 4”, in words and as a bar.

Back to top

Something wrong, unclear or missing? Report a problem with this page or suggest a change to it on GitHub. You need a GitHub account.