Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the contrast of the 'current' link colour in the header component #4952

Open
querkmachine opened this issue Apr 23, 2024 · 0 comments
Labels
accessibility-concern Any bug, feature request or question about the accessibility of a portion of a product. colour feature request User requests a new feature header

Comments

@querkmachine
Copy link
Member

Related component

Header, specifically headers with navigation links included.

Context

We've had feedback from a number of working group members that they find the blue 'current' link styling used on the header to be difficult to read, despite surpassing the 4.5:1 contrast ratio expected of text under WCAG 2.2 Level AA, at 5.76:1.

The issues with WCAG's contrast algorithm are well documented, primarily, it is solely based on the brightness difference between the two colours and doesn't account for how human actually perceive brightness in different contexts.

This view is corroborated by the draft version of WCAG 3's contrast algorithm, APCA, which assigns this colour combination a less-than-stellar score of -40.6. For text of this size and weight, we would be aiming for a value of around -75 at a bare minimum. (Roughly acceptable ranges in the APCA docs here.)

Note

APCA scores dark-on-light contrast on a scale of 0 to 105, with higher values being better. Light-on-dark combinations are conversely scored between 0 and -105, with lower values being better.

Unlike the existing WCAG algorithm, APCA takes into account factors like which colour is being used in the background and the specific size and weight of text. The scores here are therefore an estimate.

We should consider using a different tint of GOV.UK link blue for contexts with a dark background, such as the header component, to increase the perceived brightness of this content.

@querkmachine querkmachine added feature request User requests a new feature header colour accessibility-concern Any bug, feature request or question about the accessibility of a portion of a product. labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility-concern Any bug, feature request or question about the accessibility of a portion of a product. colour feature request User requests a new feature header
Projects
None yet
Development

No branches or pull requests

1 participant