Skip to content

Consider warning for poor contrast between relevant theme properties #5639

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

Open
muffinresearch opened this issue Apr 28, 2025 · 0 comments
Open

Comments

@muffinresearch
Copy link
Contributor

In some cases there are theme properties that together can result in a poor experience for end-users.

Some of these are coming up with the new sidebar + vertical tabs, and the main cause is often that the colour of text chosen for the tabs is based on a header image, but then if the frame colour (which is obscured by the header image) is either the same as the text colour, or lacks contrast with it this can cause cases where parts of the UI are illegible.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1947430 for an example:

{
	"theme": {
    	"images": {
        	"theme_frame": "Fractal33.jpg"
    	},
    	"colors": {
        	"frame": "#ffffff",
        	"tab_background_text": "#ffffff"
    	}
	},
	"version": "2.0",
	"name": "MiincDesign_33",
	"manifest_version": 2
}

This is a very basic example and other fallbacks are also likely to be needing to be considered. As other examples come up we can further details. If basic support is added for this case, this would make it trivial to extend to other properties.

This bug is to cover considering what areas might be helped if the linter warned about poor contrast, to hopefully help newly created themes and updated themes avoid colour combinations that lack contrast.

It's worth noting in this bug we're also considering client-side interventions however, since that might not be what the author wants it makes sense to start flagging contrasts issues to theme developers on the way in in addition to mitigations that might be enabled elsewhere.

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

No branches or pull requests

1 participant