-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Inaccurate error messaging with block-level colors when 'Use theme styles' is off #86467
Comments
Hi! @SiobhyB I would like to work on this issue as my first contribution to wp-calypso. I have already set up wp-calypso locally. But I need help logging in in web. Any suggestion where i can find demo log in details. Thanks, |
📌 REPRODUCTION RESULTS
##Message to author## |
@rickmgithub, re-opening as this is a valid issue.
Charcoal is not a block-based theme, which is why you couldn't reproduce there. The example I provided is the Charcoal variation of the Byrne theme.
I've captured a video here. You'll see that I start at the site editor, where I ensure a style variation that uses a dark background is selected, I think that's key. Then, I follow the rest of the steps set out in the issue's description. DEMO.mov |
@JanaganSaravanan, that's great, thank you for looking into contributing! If you have wp-calypso set up locally, you should be able to log in using any valid WordPress.com credentials. In case you're not aware, too, we also have some issues labelled as |
That's really useful. Looking forward to make contributions to wp-calypso. Thank you, |
@Automattic/dotcom-product-ambassadors 👋 Please re-triage this, testing on WPcom and Self-hosted sites. Let me know when you're done and I'll help you get it allocated for product team review! |
📌 REPRODUCTION RESULTS
📌 FINDINGS/SCREENSHOTS/VIDEO
- With the "Use theme styles" turned on the results were:
📌 ACTIONS
Before I consider it raising it to core, does anyone know how this should work? cc @annezazu if you know more |
Can you replicate this on a self hosted site? The original issues described cannot be replicated on a self hosted site and I don’t see that test case on your report. I don’t see why this would be raised with Core as a result since it appears calypso specific. What am I missing? In terms of how this should work, it basically allows you a closer preview to what your theme will show by using the styles provided by the theme when writing. You can also turn this off if you want a more default view. |
Apologies! It seems my copy-pasta skills are getting worse. I corrected my answer above and I can confirm it's the same behavior on self-hosted. |
Sweet thanks for confirming. Digging into this, I couldn't find a relevant GitHub issues in the Gutenberg repo, including when looking through closed items. In this case, it has to do with the Contrast Checker aspect of the code. What seems to be happening is that it's determining contrast based on what is on the page vs site level styling. When you turn off the theme styles, this prevents those styles from rendering and from the Contrast Checker taking that information into consideration. I think it's worth a Core issue! Are you game to open? Happy to if not :) |
Pinging @Robertght for the need for an upstream GB issues - and moving this out of the One board. |
Looks like this is something I missed through the loads of pings. I reported it here: WordPress/gutenberg#68887 |
Quick summary
When 'Use theme styles' is toggled off in the editor's settings, applying different colours at a block-level can lead to inaccurate, misleading error messages via the colour contrast checker and an overall confusing experience.
As expanded upon in the Logs or notes section, I have only been able to reproduce this within Calypso. In /wp-admin for self-hosted sites, the contrast checker appears to be disabled all together when 'Use theme styles' is toggled off.
Steps to reproduce
Setup: Enable a theme with a dark background and deactivate editor's theme styles
Experiment with light text
Experiment with dark text
What you expected to happen
I expected the in-editor contrast warnings to be accurate and for any content included in the post to be legible on the site's font-end.
What actually happened
In-editor contrast warnings are incredibly misleading as they appear to use the editor's styles as the point of reference, rather than the actual site's background.
In-editor contrast warning, despite text being legible on front-end
No in-editor contrast warning, leading to illegible text (partially highlighted with cursor for the sake of the screenshot)
Impact
Some (< 50%)
Available workarounds?
Yes, easy to implement
Platform (Simple and/or Atomic)
Simple, Atomic
Logs or notes
I was only able to reproduce the misleading error messaging within Calypso, not on a self-hosted site.
The below are screenshots contrast Calypso (testing using a simple site) vs. /wp-admin (testing using a self-hosted site without Jetpack connected). In both cases, Twenty Twenty-Four was enabled on the site, with its "Onyx" style applied (a dark-coloured background). With the default editor styles, a misleading contrast error is only shown on Calypso.
Potentially relevant: #86082
The text was updated successfully, but these errors were encountered: