-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Editor post featured image: Ensure hidden text is hidden when common CSS is not loaded #72149
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
Editor post featured image: Ensure hidden text is hidden when common CSS is not loaded #72149
Conversation
…css is not loaded
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +19 B (0%) Total Size: 1.96 MB
ℹ️ View Unchanged
|
ramonjd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Thanks for the review! 🙇 |
…css is not loaded (WordPress#72149) Co-authored-by: andrewserong <[email protected]> Co-authored-by: ramonjd <[email protected]>

What?
Update the editor post featured image component to ensure hidden text is hidden when common CSS is not loaded.
This is a similar kind of PR to some of my earlier ones that have been looking into removing our overall dependency on
common.cssresets (see: #71217 and #70685 for examples)Why?
Currently the post and site editors expect common.css to be loaded, however the editor can be used outside of a Gutenberg context where common.css might not be loaded (i.e. for plugins and custom editors). This PR ensures that the featured image doesn't accidentally display the describedby text in such a case, by ensuring that the component is responsible for its own
hiddenbehaviour.How?
display: nonerule to thehiddenclass for this component. This follows the same rule used incommon.cssTesting Instructions
Note: in normal usage this PR will appear to make no change vs trunk, so you'll need to follow the below instructions to see any difference
To replicate an environment that does not use common.css, load up the post editor and run the following from the console:
Then, add a featured image. With this PR applied, the describedby text should not display visually.
Testing Instructions for Keyboard
Screenshots or screencast