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

Content

Notice

A message box for information, success, a warning or danger, and an urgent notice for the whole site.

When to use

  • For something people must notice on this page.
  • The urgent notice: for something that affects everyone right now, such as a service outage.

When not to use

  • For form errors. Use the error summary.
  • For every paragraph. If everything stands out, nothing does.

How to use

  • Pick the type that fits: information, success, warning or danger.
  • Keep it short. Say what happened and what to do next.

Accessibility

What GGDS does

  • Each type has its own colour and a thick edge, and every type's text colour is measured against its background every time GGDS is built.

What you need to do

  • Start each notice with a word that says its type, such as "Warning:". It can be hidden on screen, but the meaning must never depend on colour alone.
  • Use role="alert" only for a notice that appears after the page has loaded.

Example: Notice types

Open this example on its own page

HTML code for “Notice types”
HTML
<div class="ggds-notice">
  <p class="ggds-notice__title"><span class="ggds-visually-hidden">Information:</span> Offices close at 3pm on Friday</p>
  <p>Online services stay open.</p>
</div>
<div class="ggds-notice ggds-notice--success">
  <p class="ggds-notice__title"><span class="ggds-visually-hidden">Success:</span> Application sent</p>
  <p>Your reference number is <strong>LIC-2026-004512</strong>.</p>
</div>
<div class="ggds-notice ggds-notice--warning">
  <p class="ggds-notice__title"><span class="ggds-visually-hidden">Warning:</span> This fee has not been confirmed</p>
  <p>Contact us before you pay.</p>
</div>
<div class="ggds-notice ggds-notice--danger">
  <p class="ggds-notice__title"><span class="ggds-visually-hidden">Important:</span> Beware of fake recruitment adverts</p>
  <p>We never charge a fee to apply for a job.</p>
</div>
JSX (React)
<>
  <div className="ggds-notice">
    <p className="ggds-notice__title"><span className="ggds-visually-hidden">Information:</span> Offices close at 3pm on Friday</p>
    <p>Online services stay open.</p>
  </div>
  <div className="ggds-notice ggds-notice--success">
    <p className="ggds-notice__title"><span className="ggds-visually-hidden">Success:</span> Application sent</p>
    <p>Your reference number is <strong>LIC-2026-004512</strong>.</p>
  </div>
  <div className="ggds-notice ggds-notice--warning">
    <p className="ggds-notice__title"><span className="ggds-visually-hidden">Warning:</span> This fee has not been confirmed</p>
    <p>Contact us before you pay.</p>
  </div>
  <div className="ggds-notice ggds-notice--danger">
    <p className="ggds-notice__title"><span className="ggds-visually-hidden">Important:</span> Beware of fake recruitment adverts</p>
    <p>We never charge a fee to apply for a job.</p>
  </div>
</>

Example: Urgent site-wide notice

Open this example on its own page

HTML code for “Urgent site-wide notice”
HTML
<div class="ggds-notice ggds-notice--urgent" role="region" aria-label="Urgent notice">
  <div class="ggds-container">
    <p class="ggds-notice__title">Flood warning for the Greater Accra Region until 6pm today. <a href="/warnings/">Read what to do</a></p>
  </div>
</div>
JSX (React)
<div className="ggds-notice ggds-notice--urgent" role="region" aria-label="Urgent notice">
  <div className="ggds-container">
    <p className="ggds-notice__title">Flood warning for the Greater Accra Region until 6pm today. <a href="/warnings/">Read what to do</a></p>
  </div>
</div>

Use it

Stylesheet
ggds.css includes it. To load only the parts you use: core.css, then components/notice.css (0.4 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:

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

<Notice type="warning" title="This fee has not been confirmed">
  <p>Contact us before you pay.</p>
</Notice>

Django

No template tag: copy the HTML into your template.

Classes and states

Classes for notice
ClassWhat it does
.ggds-noticeAn information notice.
.ggds-notice--successSomething worked.
.ggds-notice--warningSomething people need to know before they continue.
.ggds-notice--dangerSomething is wrong or risky.
.ggds-notice--urgentA site-wide notice under the header, such as an emergency.
.ggds-notice__titleThe notice's first line, starting with its type (which can be visually hidden).

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.

Manual accessibility checks for notice
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

Added in version 0.1.0. No changes since.

Every change, in What’s new

  • Tag

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

  • Error summary

    A box at the top of the page that lists every problem after a form is submitted.

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.