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

Page structure

Government website banner

Tells people the website belongs to the Government of Ghana, and how to check.

When to use

  • On every page of a government website, before the header.
  • On test, preview and copied versions of a site, use the "not official" version (ggds-banner--unofficial).

When not to use

  • On websites that are not run by a government institution.

How to use

  • Put your website's real address in "Check the address".
  • Link "register of official government websites" to the official list, when one is available.
  • The wording "An official website of the Government of Ghana" is still waiting for approval, including for state-owned companies.

Do

  • Name your website's real address.

Don't

  • Say that every government website ends in .gov.gh. Some official websites do not.

Accessibility

What GGDS does

  • It is built on <details>, so it opens and closes with the keyboard and a screen reader, without JavaScript.
  • The flag is decoration: it is drawn in CSS and has no text for screen readers.
  • It scrolls away with the page, so it takes no space on small screens.

What you need to do

  • Name your real address in "Check the address", so people can compare it with the address bar.
  • Keep the wording as published: people learn to recognise it.

Example: Official site

Open this example on its own page

HTML code for “Official site”
HTML
<section class="ggds-banner" aria-label="Official government website">
  <details class="ggds-banner__details ggds-container">
    <summary class="ggds-banner__summary">
      <svg class="ggds-banner__flag" viewBox="0 0 30 20" aria-hidden="true" focusable="false">
        <rect class="ggds-banner__flag-red" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-gold" y="6.67" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-green" y="13.33" width="30" height="6.67"/>
        <polygon class="ggds-banner__flag-star" points="15,6.8 15.73,8.99 18.04,9.01 16.19,10.39 16.88,12.59 15,11.25 13.12,12.59 13.81,10.39 11.96,9.01 14.27,8.99"/>
      </svg>
      <span class="ggds-banner__text">An official website of the Government of Ghana</span>
      <span class="ggds-banner__toggle">How to tell</span>
    </summary>
    <div class="ggds-banner__content">
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">Check the address</p>
        <p>The official address of this website is <strong>www.example.gov.gh</strong>. Most government websites end in <strong>.gov.gh</strong>, but some official websites do not. You can check it in the <a href="../../register.html">register of official government websites</a>.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">A padlock is not proof</p>
        <p>A padlock or <strong>https://</strong> before the address means your connection to the website is private. It does not show who runs the website.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">We will never ask for your PIN</p>
        <p>Government officials will never ask for your PIN, password or mobile money code, by phone, by SMS or on a website.</p>
      </div>
    </div>
  </details>
</section>
JSX (React)
<section className="ggds-banner" aria-label="Official government website">
  <details className="ggds-banner__details ggds-container">
    <summary className="ggds-banner__summary">
      <svg className="ggds-banner__flag" viewBox="0 0 30 20" aria-hidden="true" focusable="false">
        <rect className="ggds-banner__flag-red" width="30" height="6.67" />
        <rect className="ggds-banner__flag-gold" y="6.67" width="30" height="6.67" />
        <rect className="ggds-banner__flag-green" y="13.33" width="30" height="6.67" />
        <polygon className="ggds-banner__flag-star" points="15,6.8 15.73,8.99 18.04,9.01 16.19,10.39 16.88,12.59 15,11.25 13.12,12.59 13.81,10.39 11.96,9.01 14.27,8.99" />
      </svg>
      <span className="ggds-banner__text">An official website of the Government of Ghana</span>
      <span className="ggds-banner__toggle">How to tell</span>
    </summary>
    <div className="ggds-banner__content">
      <div className="ggds-banner__item">
        <p className="ggds-banner__heading">Check the address</p>
        <p>The official address of this website is <strong>www.example.gov.gh</strong>. Most government websites end in <strong>.gov.gh</strong>, but some official websites do not. You can check it in the <a href="../../register.html">register of official government websites</a>.</p>
      </div>
      <div className="ggds-banner__item">
        <p className="ggds-banner__heading">A padlock is not proof</p>
        <p>A padlock or <strong>https://</strong> before the address means your connection to the website is private. It does not show who runs the website.</p>
      </div>
      <div className="ggds-banner__item">
        <p className="ggds-banner__heading">We will never ask for your PIN</p>
        <p>Government officials will never ask for your PIN, password or mobile money code, by phone, by SMS or on a website.</p>
      </div>
    </div>
  </details>
</section>

Example: Unofficial copy (staging, preview, mirror)

Open this example on its own page

HTML code for “Unofficial copy (staging, preview, mirror)”
HTML
<section class="ggds-banner ggds-banner--unofficial" aria-label="Official government website">
  <details class="ggds-banner__details ggds-container">
    <summary class="ggds-banner__summary">
      <svg class="ggds-banner__flag" viewBox="0 0 30 20" aria-hidden="true" focusable="false">
        <rect class="ggds-banner__flag-red" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-gold" y="6.67" width="30" height="6.67"/>
        <rect class="ggds-banner__flag-green" y="13.33" width="30" height="6.67"/>
        <polygon class="ggds-banner__flag-star" points="15,6.8 15.73,8.99 18.04,9.01 16.19,10.39 16.88,12.59 15,11.25 13.12,12.59 13.81,10.39 11.96,9.01 14.27,8.99"/>
      </svg>
      <span class="ggds-banner__text">This copy is not the official Example Agency website</span>
      <span class="ggds-banner__toggle">How to tell</span>
    </summary>
    <div class="ggds-banner__content">
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">Check the address</p>
        <p>The official Example Agency website is <strong>www.example.gov.gh</strong>. Most government websites end in <strong>.gov.gh</strong>, but some official websites do not. You can check it in the <a href="../../register.html">register of official government websites</a>.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">A padlock is not proof</p>
        <p>A padlock or <strong>https://</strong> before the address means your connection to the website is private. It does not show who runs the website.</p>
      </div>
      <div class="ggds-banner__item">
        <p class="ggds-banner__heading">We will never ask for your PIN</p>
        <p>Government officials will never ask for your PIN, password or mobile money code, by phone, by SMS or on a website.</p>
      </div>
    </div>
  </details>
</section>
JSX (React)
<section className="ggds-banner ggds-banner--unofficial" aria-label="Official government website">
  <details className="ggds-banner__details ggds-container">
    <summary className="ggds-banner__summary">
      <svg className="ggds-banner__flag" viewBox="0 0 30 20" aria-hidden="true" focusable="false">
        <rect className="ggds-banner__flag-red" width="30" height="6.67" />
        <rect className="ggds-banner__flag-gold" y="6.67" width="30" height="6.67" />
        <rect className="ggds-banner__flag-green" y="13.33" width="30" height="6.67" />
        <polygon className="ggds-banner__flag-star" points="15,6.8 15.73,8.99 18.04,9.01 16.19,10.39 16.88,12.59 15,11.25 13.12,12.59 13.81,10.39 11.96,9.01 14.27,8.99" />
      </svg>
      <span className="ggds-banner__text">This copy is not the official Example Agency website</span>
      <span className="ggds-banner__toggle">How to tell</span>
    </summary>
    <div className="ggds-banner__content">
      <div className="ggds-banner__item">
        <p className="ggds-banner__heading">Check the address</p>
        <p>The official Example Agency website is <strong>www.example.gov.gh</strong>. Most government websites end in <strong>.gov.gh</strong>, but some official websites do not. You can check it in the <a href="../../register.html">register of official government websites</a>.</p>
      </div>
      <div className="ggds-banner__item">
        <p className="ggds-banner__heading">A padlock is not proof</p>
        <p>A padlock or <strong>https://</strong> before the address means your connection to the website is private. It does not show who runs the website.</p>
      </div>
      <div className="ggds-banner__item">
        <p className="ggds-banner__heading">We will never ask for your PIN</p>
        <p>Government officials will never ask for your PIN, password or mobile money code, by phone, by SMS or on a website.</p>
      </div>
    </div>
  </details>
</section>

Use it

Stylesheet
ggds.css includes it. To load only the parts you use: core.css, then components/banner.css (0.7 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 Banner from '@ggds/astro/Banner.astro';

<Banner official shortName="NCA" host="nca.org.gh" />

React and Next.js

With @ggds/react:

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

<Banner shortName="Example Agency" host="www.example.gov.gh" official />

Django

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

Django template
{% ggds_banner short_name="NCA" host="nca.org.gh" official=True %}

Classes and states

Classes for government website banner
ClassWhat it does
.ggds-bannerThe banner: a strip above the header.
.ggds-banner--unofficialFor a website not served from its official address: says so and names the real one.
.ggds-banner__detailsThe <details> element that opens and closes the explanation.
.ggds-banner__summaryThe always-visible line: the flag, the sentence and the toggle.
.ggds-banner__flagThe small Ghana flag, drawn in CSS.
.ggds-banner__flag-redThe flag's red stripe.
.ggds-banner__flag-goldThe flag's gold stripe.
.ggds-banner__flag-greenThe flag's green stripe.
.ggds-banner__flag-starThe flag's black star.
.ggds-banner__textThe sentence "An official website of the Government of Ghana".
.ggds-banner__toggle"Here's how you know", with an arrow that turns when the banner is open.
.ggds-banner__contentThe explanation shown when open: two items side by side from 48rem.
.ggds-banner__itemOne item of the explanation.
.ggds-banner__headingAn item's heading.
States of government website banner
StateWhat it does
[open] on .ggds-banner__detailsOpen: the explanation shows and the arrow points up.

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: “the identification banner opens”

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 government website banner
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 government website banner, newest first
VersionChange
0.4.0React and Astro: the banner's register link and the hero's search label now default to GGDS's own words, so you no longer have to pass them. React has errorTitle() for the page title while a form has errors.
0.1.0New: @ggds/astro, the page parts as Astro components (skip link, banner, header, hero, footer, tab bar).
0.1.0New: ggds-django, for Django and Django-based CMSs such as Wagtail: the page parts as template tags, a form renderer that turns any Django form into GGDS markup with an error summary and accessible errors, and the GGDS styles, themes and script as static files.
0.1.0Added.

Every change, in What’s new

  • Header and main navigation

    Your institution's logo and name, the main sections and search, at the top of every page.

  • Page template

    How the parts of a page fit together, in the same order on every government website.

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.