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

Warning text icon clipped in Firefox v73+ when using high contrast mode or overriding colours #1863

Closed
36degrees opened this issue Jul 15, 2020 · 5 comments

Comments

@36degrees
Copy link
Contributor

36degrees commented Jul 15, 2020

In the warning text icon, we use a 3px border (which is usually visually indistinct from the background) in order to better support users who use High Contrast Mode or override colours:

Screenshot 2020-07-15 at 14 02 20

// When a user customises their colours the background colour will often be removed.
// Adding a border to the component keeps it's shape as a circle.
border: 3px solid govuk-colour("black");

Firefox 73 introduced a new 'readability backplate' feature:

Many users with low vision rely on Windows' High Contrast Mode to make websites more readable. Traditionally, to increase the readability of text, Firefox has disabled background images when High Contrast Mode is enabled. With today’s release of Firefox 73, we introduce a “readability backplate” solution which places a block of background color between the text and background image. Now, websites in High Contrast Mode are more readable without disabling background images.

The new solid 'block' of background colour causes a clipping effect around the warning text icon in Firefox 73+.

Screenshot 2020-07-15 at 14 03 14

@36degrees
Copy link
Contributor Author

We could consider using an SVG for the icon.

@36degrees
Copy link
Contributor Author

After #2186 is merged, this should be fixed as and when / if Firefox implements the forced-color-adjust property – for which there are positive signals.

@36degrees
Copy link
Contributor Author

Firefox 89 introduces support for the forced-colors CSS media, but seemingly not forced-color-adjust.

Looks like https://bugzilla.mozilla.org/show_bug.cgi?id=1591210 is the bug to watch for that property being implemented.

@36degrees
Copy link
Contributor Author

Fixed in Firefox 113 Beta:

The forced-color-adjust property is now supported, allowing authors to opt an element out of color changes in Forced Color Mode for improved readability where the automatically-picked contrasting colors are not ideal.

https://www.mozilla.org/en-US/firefox/113.0beta/releasenotes/

Screenshot 2023-04-26 at 09 59 44
Screenshot 2023-04-26 at 10 00 24

Firefox 113 should be released on May 9.

@36degrees
Copy link
Contributor Author

I'm going to close this as – other than waiting for Firefox 113 to be released – the issue has been resolved and there's nothing for us to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants