Inclusive forms: Anatomy of a (fictional) GOV.UK service
Last night I spoke for the first time at the London Accessibility Meetup.
I talked about how we build inclusive online forms across government, using a fictional GOV.UK service as an example.
To those who weren’t able to make it, the talk is available on YouTube.
In putting it together I found myself pulling together information from loads of different blog posts, previous talks, and from pull requests and issues from GitHub.
This is an attempt to link out to all of those things, for anyone that wants to find out more.
Update: I gave this talk again at MK Geek Night on 5 September 2019, as ‘Government services that work for everyone’. This version of the talk has been updated slightly to include new changes since February, and to adapt it for a more general audience. I’ve tried to document what was changed.
Have I missed something out here? Feel free to edit this post on GitHub and raise a pull request.
Introduction
- ‘It doesn’t have to be perfect – we just have to make it a little better than we did yesterday’ – Léonie Watson, Technologic (Human After All): Accessibility remix, ffconf 2016
1. Start Page
Naming your service using verbs, not nouns
- Good services are verbs, bad services are nouns – Louise Downe, design in government blog, June 2015
- Naming your service – GOV.UK Service Manual, October 2016
- ‘So what to call it is the most important conversation you can have about a service’ – Stephen Gill (via Trisha Doyle, Twitter), July 2016
Conveying page structure using headings
Ensuring that links that look like buttons behave like buttons
- Discussion about removing the button role from the link – GitHub issue on GOV.UK Elements, July 2016
- ARIA: button role – MDN web docs
- JavaScript used to trigger button click event when the spacebar is pressed – GOV.UK Frontend
- Contribution to add
draggable="false"
to buttons in response to user research – Chris Hill-Scott, GOV.UK Frontend, October 2018 - Button – GOV.UK Design System
Clear and consistent focus states
- Understanding Success Criterion 2.4.7: Focus Visible – Understanding WCAG 2.1
- Understanding Success Criterion 1.4.11: Non-text Contrast – Understanding WCAG 2.1
- GOV.UK’s current focus state – checked using Nick Colley’s contrast checker app
- Investigate colour contrast issues with the focus state – GitHub issue on GOV.UK Frontend, January 2019
Update: Since September 2019:
- Closed pull request with a design spike into the new focus states – Dave House, March 2019
- Pull requests to update the focus state for links, form inputs, radios and checkboxes, buttons, tabs, accordions, and the footer – Oliver Byford, Hanna Laakso, Nick Colley & Alistair Laing, April - May 2019
- We’ve made the GOV.UK Design System more accessible - Amy Hupe and Dave House, design in government blog, July 2019
2. Have you held a juggling licence before?
Supporting users who change colours in their browser
- CSS Triangles – Chris Coyier, CSS Tricks, October 2009
- Accessibility and me: Marian Foley – Marian Foley, accessibility in government blog, May 2016
- How users change colours on websites – Anika Henke, accessibility in government blog, March 2017
- Supporting users who change colours on GOV.UK – Nick Colley, accessibility in government blog, August 2018
- Sass mixin to create arrows using both border triangles and clip-path – GOV.UK Frontend
- clip-path – MDN web docs
- Investigate customised colours in IE11 / Edge – GitHub issue on GOV.UK Frontend, August 2018
Start with one thing per page
- One thing per page – Tim Paul, design in government blog, July 2015
- Structuring forms – GOV.UK Service Manual, December 2016
- Question pages – GOV.UK Design System
Making a legend a heading
- Pull request to de-duplicate legends/headings – Anika Henke, June 2017
Custom radio buttons and checkboxes
- Making radio buttons and checkboxes easier to use – Robin Whittleton, technology in government blog, August 2015
- Discussion about GOV.UK Verify style radios and checkboxes – Gemma Leigh, March 2016
- Pull request to add custom radios / checkboxes to GOV.UK Elements – Robin Whittleton, August 2016
- Checkboxes – GOV.UK Design System
- Radios – GOV.UK Design System
3. Previous licence details
Form layout
- Form elements – GOV.UK Elements
Asking for dates
- Asking for a date of birth – Joe Lanman, design in government blog, December 2013)
- Burn your select tags (Video) – Alice Bartlett, EpicFEL 2014
- Ask users for dates – GOV.UK Design System
Helping users understand when there is a problem
- How we’ve made GOV.UK Elements even more accessible – Anika Henke, accessibility in government blog, February 2018
- Pull request to change the error summary ARIA role to ‘alert’ – Anika Henke, June 2017
- Pull request to add ‘Error:’ to the page title when there is an error – Anika Henke, June 2017
- Error summary – GOV.UK Design System
Linking from the error summary to different fields
- Discussion about the error summary component in the community backlog
- Results of testing different options with assistive technologies (test case)
- Pull request to add guidance on linking from the error summary – Oliver Byford, November 2018
- Pull request to scroll to the label or legend when linked from the error summary – Oliver Byford, November 2018
- JavaScript used to focus the error summary and scroll to the label or legend – GOV.UK Frontend
Associating the error message with the input
- No semantics to distinguish labels, hint texts and error messages – GitHub issue on GOV.UK Elements, November 2017
- Pull request to move the error message out of the label legend, and associate using
aria-describedby
– Alex Jurubita, May 2018 - Error message – GOV.UK Design System
Update: Since September 2019:
- Pull request to add hidden “Error:” prefix to error messages – Oliver Byford, February 2019
4. What is your most impressive juggling trick?
Making a legend a label
- Making labels and legends headings - GOV.UK Design System
- Consider adding headings to allowed content in
<label>
element – Oliver Byford, HTML specification (w3c), March 2018 - Pull request to allow headings within label elements (rejected) – Oliver Byford, HTML specification (w3c), March 2018
- Pull request to better define relationship between headings, error message and hints – Oliver Byford, May 2018
Providing feedback using a character count
- Building Accessible Components and the GOV.UK Design System (Video) – Alice Noakes, Ed Horsford & Alex Jurubita, London Accessibility Meetup #13, April 2018
- Character count prototype
- Pull request to add character count component – Alex Jurubita, August 2018
- Character count – GOV.UK Design System
5. Check your answers
- Pull request to add the summary list component – Dave House & Nick Colley, November 2018
- Pull request to add ‘check your answers’ page to the Prototype Kit – Rebecca Cottrell, October 2015
- Help users to check answers– GOV.UK Design System
6. Confirmation page
- Pull request with fixes for components with overriden colours – Oliver Byford, December 2017
- Supporting users who change colours on GOV.UK – Nick Colley, accessibility in government blog, August 2018
- Confirmation pages – GOV.UK Design System
General links
- GOV.UK Design System
- GOV.UK Service Manual
- GitHub: GOV.UK Frontend repository
- GitHub: GOV.UK Design System repository
- GitHub: Community backlog
Corrections & changes
- ‘Register as a childminder’ is built by Ofsted, not the Department for Education.
Changes made for ‘government services that work for everyone’
For the talk at MK Geek Night in September 2019:
- The title of the talk was changed, and some additional introduction content added.
- The section on focus states was updated to include information about changes that we’ve made (the previous talk explained the problem, but at that point we did not have a solution)
- (Nearly) all of the screenshots were updated to use the new colour palette and focus states
- Some of the more technical detail was removed
- Details about the WCAG 2.1 1.4.11 ‘Non-text contrast’ criteria were removed – I now just mention that the old focus state meant that we ‘were not meeting new accessibility guidelines’
- The section on error messages was updated to talk about the visually hidden ‘Error’ prefix
- A slide was added to try and better credit all of the brilliant individuals who have done so much of the work