govuk-frontend
govuk-frontend copied to clipboard
WCAG 2.2: Explore how to handle focus state of short links
What
Figure out how to present focus states for links of 4 or fewer characters and for components which use the link styles.
Why
During testing of components against WCAG 2.2 criterion 2.4.13: focus appearance as part of https://github.com/alphagov/govuk-frontend/issues/4347, it was discovered that we have several failures within components to do with parts of these components using our link decoration. The root problem is that that very short links have too small a focus area to pass the criteria. The link style itself does pass the criterion, however components that use the link decoration but not the default link colour eg: breadcrumbs using black links fail this because they lose the contrast between the blue and black that links typically have.
This impacts the following components:
- Back links
- Breadcrumbs
- Error summary
- Pagination
- Summary list (summary cards fail but summary lists pass)
- Tabs
As part of this work, we have an opportunity to also update our link guidance to encourage users to not use short links in their content.
Further reading
- Testing spreadsheet (internal only)
- https://github.com/alphagov/govuk-design-system/issues/3007 - related issue on focus state rationalisation
Who needs to work on this
Developers, designers
Who needs to review this
Developers, designers
Done when
- [ ] Solution to how to present short links is devised and merged into
main
- [ ] Link guidance is updated to advise not using short links