Skip to content

Commit

Permalink
[WIP] Fix accessibility failures
Browse files Browse the repository at this point in the history
  • Loading branch information
domoscargin committed Feb 14, 2024
1 parent 3403d7c commit 071a6bd
Show file tree
Hide file tree
Showing 39 changed files with 55 additions and 44 deletions.
15 changes: 13 additions & 2 deletions __tests__/accessibility-audit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,19 @@ async function axe(page) {
// Additionally, we are relying on accessibility testing in govuk-frontend to cover these.
'.app-example__frame'
)
// TODO

// TODO: govuk-breadcrumbs sets off the "must be contained in landmarks" rule. Needs investigation.
.exclude('.govuk-breadcrumbs')

// TODO: figure out how and whether to re-enable these rules, or target them better
.disableRules([
'region',
'color-contrast-enhanced',
'aria-allowed-attr',
'target-size',
'aria-allowed-role'
])

.withTags([
'best-practice',

Expand All @@ -61,7 +72,7 @@ async function axe(page) {
])

// Create report
const report = await reporter.options({}).analyze()
const report = await reporter.analyze()

// Add preview URL to report violations
report.violations.forEach((violation) => {
Expand Down
4 changes: 2 additions & 2 deletions src/accessibility/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Our work to make the GOV.UK Design System meet public sector accessibility regul

Using the GOV.UK Design System in a service does not immediately make that service accessible. You’ll need additional research, design, development and testing work to make sure your service is accessible, even when using accessible styles, components and patterns.

### Accessibility changes to the Design System to meet WCAG 2.2
## Accessibility changes to the Design System to meet WCAG 2.2

[Read our guidance on the Web Content Accessibility Guidelines (WCAG) 2.2](/accessibility/wcag-2.2) to make sure teams using the Design System are aware of the changes and can make the necessary adjustments to their services.

### Accessibility strategy
## Accessibility strategy

[Read our accessibility strategy](/accessibility/accessibility-strategy/) for more information on our current principles and work needed to improve the accessibility of the GOV.UK Design System.
6 changes: 3 additions & 3 deletions src/accessibility/wcag-2.2/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ In 2023, the Design System team assessed and updated the GOV.UK Design System to

We [included code changes in GOV.UK Frontend v5.0.0](https://frontend.design-system.service.gov.uk/changes-to-govuk-frontend-v5/) to make it easier for services to make changes to comply with WCAG 2.2. We also added guidance to make teams aware of the changes and help them make necessary adjustments to their services.

### Make sure your service meets the new WCAG 2.2 criteria
## Make sure your service meets the new WCAG 2.2 criteria

WCAG 2.2 was published in October 2023. You’ll need to comply with the new criteria no later than October 2024. See more about [Meeting government accessibility requirements](https://www.gov.uk/service-manual/helping-people-to-use-your-service/understanding-wcag) in the GOV.UK Service Manual.

### What you need to do
## What you need to do

1. Revisit the [Government Digital Service (GDS) guidance](https://www.gov.uk/guidance/accessibility-requirements-for-public-sector-websites-and-apps) on what accessibility is and why your service needs to invest in it
2. Read [What’s new in WCAG 2.2](https://www.w3.org/WAI/standards-guidelines/wcag/new-in-22/) to understand the new criteria your service will need to comply with
Expand All @@ -31,7 +31,7 @@ WCAG 2.2 was published in October 2023. You’ll need to comply with the new cri

Make sure there's expertise within your organisation by advocating for people to receive training in accessibility. To provide some help with this, the Design System team is [organising community events](/community/) to help service teams share information with each other.

### Components and patterns affected in the Design System
## Components and patterns affected in the Design System

We've made changes to these components and patterns to comply with WCAG 2.2 level AA. You must check if your service needs amending to align with these changes.

Expand Down
2 changes: 1 addition & 1 deletion src/community/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Everyone can help improve the Design System by joining our community discussions

We depend on a strong cross-government community to ensure the Design System includes the latest research, design and development to represent and be relevant for its users. Read our [community principles](/community/community-principles/).

### Sign up to our mailing list
## Sign up to our mailing list

[Find out when we announce new events, workshops and ask for help from our community](https://mailchi.mp/707ce8dec373/get-updated-by-email-govuk-design-system).

Expand Down
2 changes: 1 addition & 1 deletion src/components/accordion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ We updated this component in December 2021 to solve an accessibility issue where

The team made sure the component is accessible, for example that users can interact with it using just the keyboard.

#### Users that navigate using ‘elements lists’
### Users that navigate using ‘elements lists’

We need to find out more about users that navigate using ‘elements lists’ of headings, buttons, links and other elements – such as users of speech recognition software and partially-sighted users of screen readers.

Expand Down
2 changes: 1 addition & 1 deletion src/components/back-link/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use the back link component to help users go back to the previous page in a mult
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Back link’ and comply with new success criteria introduced in Web Content Accessibility Guidelines (WCAG) 2.2, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/breadcrumbs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The breadcrumbs component helps users to understand where they are within a webs
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use ‘Breadcrumbs' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ layout: layout-pane.njk
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Button' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/cookie-banner/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Allow users to accept or reject cookies which are not essential to making your s
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Cookie banner' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/error-message/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Error message' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/file-upload/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘File upload' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/footer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The footer provides copyright, licensing and other information about your servic
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Footer' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/header/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The GOV.UK header shows users that they are on GOV.UK and which service they are
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Header' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/phase-banner/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use the phase banner component to show users your service is still being worked
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Phase banner' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/select/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ layout: layout-pane.njk
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Select' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/summary-list/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use a summary list to summarise information, for example, a user’s responses a
classes: "app-tag"
}) }}

### WCAG 2.2 criteria might affect this component
## WCAG 2.2 criteria might affect this component

To use ‘Summary list’ and comply with new success criteria introduced in Web Content Accessibility Guidelines (WCAG) 2.2, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/components/tag/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Use the tag component to show users the status of something.
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this component
## New WCAG 2.2 criteria affects this component

To use the ‘Tag' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
4 changes: 2 additions & 2 deletions src/design-system-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ The GOV.UK Design System at the [Government Digital Service](https://www.gov.uk/

If you want to contact the team you can [get in touch via email or Slack](/get-in-touch/).

### Team leads
## Team leads

- Chris Ballantine-Thomas – Senior Interaction Designer
- Kelly Lee – Senior Delivery Manager
- Oliver Byford – Lead Frontend Developer
- Steve Messer – Senior Product Manager
- Trang Erskine – Senior Product Manager

### Design System team
## Design System team

- Anika Henke – Senior Accessibility Specialist
- Brett Kyle – Senior Frontend Developer
Expand Down
2 changes: 1 addition & 1 deletion src/patterns/addresses/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'Addresses' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/bank-details/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'Bank details' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/check-a-service-is-suitable/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Ask users questions to help them work out if they can or should use your service
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Check a service is suitable' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/check-answers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Let users check their answers before submitting information to a service.
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Check answers' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/complete-multiple-tasks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Help users understand:
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Complete multiple tasks' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/confirm-a-phone-number/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Check that a user has access to a specific mobile phone number using a security
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Confirm a phone number' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/confirm-an-email-address/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Confirm an email address' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/contact-a-department-or-service-team/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Give users contact information within your service.
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Contact a department or service team' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/create-accounts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Help users create an account for your service.
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Create accounts' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/email-addresses/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'Email addresses' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/equality-information/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Public sector organisations have a duty to consider the need to avoid discrimina
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'Equality information' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/names/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ layout: layout-pane.njk
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'Names' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/national-insurance-numbers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'National insurance numbers' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/page-not-found-pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A page not found tells someone we cannot find the page they were trying to view.
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To use ‘Page not found pages' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/passwords/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Help users to create and enter secure and memorable passwords.
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'Passwords' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/payment-card-details/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To ask users for 'Payment card details' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/problem-with-the-service-pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To use ‘There is a problem with the service pages' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/question-pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This pattern explains when to use question pages and what elements they need to
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To use ‘Question pages' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/service-unavailable-pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This guidance is for government teams that build online services. [To find infor
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To use ‘Service unavailable pages' and meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/patterns/validation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Check the information the user gives you to make sure it’s valid. If there's a
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects this pattern
## New WCAG 2.2 criteria affects this pattern

To help users to 'Recover from validation errors' and meet the new WCAG 2.2 criteria, make sure that users can successfully:

Expand Down
2 changes: 1 addition & 1 deletion src/styles/images/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Avoid using images for unnecessary decoration. Only use images if there’s a re
classes: "app-tag"
}) }}

### New WCAG 2.2 criteria affects how you use images
## New WCAG 2.2 criteria affects how you use images

To meet the new Web Content Accessibility Guidelines (WCAG) 2.2 criteria, [make sure any icons and images used in links meet the minimum target size](/styles/images/#wcag-icon-focus). This is to make sure users can easily interact with the link.
{% endset %}
Expand Down

0 comments on commit 071a6bd

Please sign in to comment.