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

Pattern

Help people find what they came for

A homepage that leads with search and the most common tasks, then the main sections as cards.

When to use

  • On the homepage of every institution's website, and on the front page of a large section.

How it works

  1. The hero says in one line what the institution does, asks what people need, and offers search and up to six common tasks.
  2. Cards for the main sections, each with one sentence saying what is in it.
  3. News and notices come after the tasks, not before: most visitors come to do something.
  4. On phones, the tab bar keeps Home, three main sections and Search one tap away.

Choosing the tasks

  • Start from evidence: your website's most-visited pages and searches, and the questions your call centre and front desk get most.
  • Write tasks as things people do: "Make a complaint", "Check if a courier is licensed". Not department names.
  • Review them every few months, and when a deadline or a public notice changes what people need.
  • Make the search work well before you put it first: it should find services by the words people use, including common misspellings.
  • It is a normal form (GET to your search page), so it works without JavaScript and results can be shared.

Accessibility

  • The hero's heading is the page's <h1>; card titles are <h2>.
  • Do not use a carousel or slideshow: people miss what moves past, and it is hard to use with a keyboard or screen reader.

Example: The top of a homepage

Open this example on its own page

HTML code for “The top of a homepage”
HTML
<div data-ggds-theme="nca">
<section class="ggds-hero" aria-labelledby="home-title">
  <div class="ggds-hero__inner">
    <div class="ggds-hero__body">
      <p class="ggds-hero__purpose">We regulate communications in Ghana and protect the people who use them.</p>
      <h1 class="ggds-hero__title" id="home-title">What do you need help with?</h1>
      <form class="ggds-hero__search" action="/search/" method="get" role="search">
        <label class="ggds-visually-hidden" for="home-q">Search this website</label>
        <input class="ggds-hero__input" id="home-q" name="q" type="search" required minlength="2" enterkeyhint="search" autocomplete="off" placeholder="Search, for example: SIM registration">
        <button class="ggds-hero__button" type="submit"><svg class="ggds-hero__button-icon" 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="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg><span class="ggds-hero__button-label">Search</span></button>
      </form>
      <p class="ggds-hero__tasks-label" id="home-tasks">Common tasks:</p>
      <ul class="ggds-hero__tasks" aria-labelledby="home-tasks">
        <li><a class="ggds-hero__task" href="/complaints/">Make a complaint</a></li>
        <li><a class="ggds-hero__task" href="/sim-registration/">Register your SIM</a></li>
        <li><a class="ggds-hero__task" href="/licences/">Apply for a licence</a></li>
      </ul>
    </div>
  </div>
</section>
<main class="ggds-main ggds-container" id="main" tabindex="-1">
  <h2>Our services</h2>
  <ul class="ggds-card-grid">
    <li class="ggds-card"><h3 class="ggds-card__title"><a class="ggds-card__link" href="/licences/">Licences</a></h3><p class="ggds-card__body">Who needs one, what it costs and how to apply.</p></li>
    <li class="ggds-card"><h3 class="ggds-card__title"><a class="ggds-card__link" href="/complaints/">Complaints</a></h3><p class="ggds-card__body">When your provider has not solved a problem.</p></li>
    <li class="ggds-card"><h3 class="ggds-card__title"><a class="ggds-card__link" href="/laws/">Laws and regulations</a></h3><p class="ggds-card__body">Acts, regulations and guidelines in force.</p></li>
  </ul>
</main>
</div>
JSX (React)
<div data-ggds-theme="nca">
<section className="ggds-hero" aria-labelledby="home-title">
  <div className="ggds-hero__inner">
    <div className="ggds-hero__body">
      <p className="ggds-hero__purpose">We regulate communications in Ghana and protect the people who use them.</p>
      <h1 className="ggds-hero__title" id="home-title">What do you need help with?</h1>
      <form className="ggds-hero__search" action="/search/" method="get" role="search">
        <label className="ggds-visually-hidden" htmlFor="home-q">Search this website</label>
        <input className="ggds-hero__input" id="home-q" name="q" type="search" required minLength={2} enterKeyHint="search" autoComplete="off" placeholder="Search, for example: SIM registration" />
        <button className="ggds-hero__button" type="submit"><svg className="ggds-hero__button-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7" /><path d="m20 20-3.5-3.5" /></svg><span className="ggds-hero__button-label">Search</span></button>
      </form>
      <p className="ggds-hero__tasks-label" id="home-tasks">Common tasks:</p>
      <ul className="ggds-hero__tasks" aria-labelledby="home-tasks">
        <li><a className="ggds-hero__task" href="/complaints/">Make a complaint</a></li>
        <li><a className="ggds-hero__task" href="/sim-registration/">Register your SIM</a></li>
        <li><a className="ggds-hero__task" href="/licences/">Apply for a licence</a></li>
      </ul>
    </div>
  </div>
</section>
<main className="ggds-main ggds-container" id="main" tabIndex={-1}>
  <h2>Our services</h2>
  <ul className="ggds-card-grid">
    <li className="ggds-card"><h3 className="ggds-card__title"><a className="ggds-card__link" href="/licences/">Licences</a></h3><p className="ggds-card__body">Who needs one, what it costs and how to apply.</p></li>
    <li className="ggds-card"><h3 className="ggds-card__title"><a className="ggds-card__link" href="/complaints/">Complaints</a></h3><p className="ggds-card__body">When your provider has not solved a problem.</p></li>
    <li className="ggds-card"><h3 className="ggds-card__title"><a className="ggds-card__link" href="/laws/">Laws and regulations</a></h3><p className="ggds-card__body">Acts, regulations and guidelines in force.</p></li>
  </ul>
</main>
</div>

Components used

  • Page template

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

  • Header and main navigation

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

  • Hero

    The top of a homepage, in your institution's colour. It asks visitors what they need.

  • Card

    A box that sums up a page, service or document and links to it.

  • Tab bar

    Home, up to three main sections and Search, fixed to the bottom of the screen on phones.

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.