Skip to content

ringing

A GOV.UK transactional service, built the GDS way: one thing per page, progressive enhancement, WCAG 2.1 AA.

Government services look simple on purpose, and that simplicity is the hard part. ringing is a small “apply for a licence” service built the way the Government Digital Service builds them: one question per page, rendered on the server, working with JavaScript switched off, and accessible to WCAG 2.1 AA. The licence is for ringing a protected bird species at a reserve (a licensed activity in the UK), at the same reserves bird-platform models, so the two pieces describe one domain from two different disciplines.

GOV.UK Design SystemTypeScriptExpressNunjucksWCAG 2.1 AAView on GitHub (opens in new tab)

One thing per page

The hard part of a form is the journey, not the fields. The GDS pattern is to ask one thing per page and let the sequence carry the complexity: a start page, four questions (name, species, reserve, a start date), a check-your-answers step, and a confirmation with a reference. Each question is a GET to render and a POST to validate and redirect, the post/redirect/get loop, so a refresh never re-submits. The step order, the option lists, and whether an application is complete live in one plain-data module with no framework in it, which is what lets the journey be unit-tested without a server.

ringing journey flowA start page leads to four questions asked one per page (name, species, reserve, start date), then a check-your-answers page, then a confirmation page with a reference number. Each step is a server-rendered form that posts and redirects to the next. A change link loops from check-your-answers back to a single question and returns.Start pageOne question per pageName · Species · Reserve · Start datetext · radios + reveal · radios · date inputCheck youranswersConfirmation+ referenceChangeEach hop: POST → validate → 303 redirect (post/redirect/get)Server-rendered forms: the whole journey works with JavaScript switched off
One thing per page: each step is a server-rendered form that POSTs, validates, and redirects to the next (post/redirect/get), so a refresh never re-submits and none of it needs JavaScript. From check-your-answers, a Change link returns to a single question and then back, not a restart, and jumping ahead with an unfinished application bounces back to the first gap.

Check-your-answers is a round-trip, not a dead end. A Change link carries you back to a single question and then returns you to the summary rather than restarting the flow, and trying to jump ahead to the summary with an unfinished application bounces you back to the first unanswered question. Small behaviours, but they are what separate a real GDS journey from a stack of forms.

Try it live

This one you can click through, not just read about. The walkthrough below is a static export of the happy path: the real pages, rendered by the real app, with each form turned into a forward link, because a static host cannot run the server behind it.

A static page can show the journey, not the validation. To exercise the real thing (the error handling and the no-JavaScript behaviour), clone it and run it: the repo ships the service, its tests and its CI.

git clone https://github.com/raby/ringing && cd ringing
npm install
npm start          # the real service at http://localhost:3000

npm run test:e2e   # the journey with JS ON and OFF, then axe on every page

Progressive enhancement, for real

The service works with JavaScript off, it does not merely degrade. Every step is a plain server-rendered form, so the entire journey, including validation and the error summary, runs with scripting disabled. JavaScript only enhances: it moves focus to the error summary and collapses the conditional reveal. An end-to-end test drives the whole journey with javaScriptEnabled: false so that promise cannot quietly rot.

Accessible, and tested that way

Accessible is something you test, not something you claim. Validation is server-side only, with the browser’s own checks turned off, so the error summary takes focus, each message links to its field, and the page title gains an Error: prefix. The three-field date input does the fiddly part properly: it names which part is missing and reddens only that box.

// Each validation error carries the message AND the id to focus, so the error
// summary can send the user straight to the field that is wrong.
if (!present.day || !present.month || !present.year) {
  const missing = (['day', 'month', 'year'] as const).filter((p) => !present[p])
  return dateError(
    `${subject} must include a ${list(missing)}`,                 // "...must include a month"
    { day: !present.day, month: !present.month, year: !present.year }, // only that box reddens
    missing[0],                                      // focus moves to #start-date-month
  )
}

Every page is held to the bar, not just the home page. Playwright runs axe against WCAG 2.1 A and AA on every screen, the error state included. One axe finding is filtered, on purpose and in the open: the Design System’s conditional reveal adds aria-expanded to the controlling radio, which the ARIA spec does not list for that role. It is a deliberate, documented GOV.UK decision that ships on real services, so filtering exactly that one finding, and nothing else, keeps the demo honest by mirroring how the live services behave.

Knowing where the brand line is

Using the Design System is encouraged; wearing the brand is not. The GOV.UK crown, the GOV.UK logotype, the Open Government Licence and Crown copyright are reserved for live services on gov.uk, and the Design System’s header and footer hardcode them. So this demonstration uses the Design System in full but swaps in a neutral service header and an honest footer, with a Prototype banner that states plainly it is not a real service. Knowing where that line sits is itself part of building for government.

A frontend, on purpose

This one is a frontend, not another backend. It sits alongside bird-platform (Kotlin), nestbox (Go) and ripple (TypeScript) as the government and accessibility corner of a deliberately wide set: progressive enhancement, the GOV.UK Design System, and the discipline of making a transactional journey work for everyone, keyboard and screen reader included, with the JavaScript turned off.