-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Audio and Video: Hide caption controls in contentOnly mode #71368
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
Audio and Video: Hide caption controls in contentOnly mode #71368
Conversation
|
Size Change: +27 B (0%) Total Size: 1.92 MB
ℹ️ View Unchanged
|
|
Text tracks in principle should be internal to the video (like captions files: they get applied inside the video window) so they don't alter the design in any way. I'm inclined to treat these as alt text for images and keep them editable, because like alt text they're an a11y feature. |
|
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. |
Sure, I can remove the check for the text tracks. I mostly included it based on frequency with which folks might use the control, but don't feel strongly about it! |
Done! |
|
Tbh I'm not sure about any of the rules of write mode 😅 but I know we do want to keep the Image alt text because we even made a special component for it here. Video captions and descriptions are a similar a11y feature so we might as well be consistent and make them available. I'm not even sure it makes sense to not allow adding captions to images when we want to allow adding content to quotes, galleries, lists, etc. Captions aren't decorative and the need for a caption might depend on the image being shown. But again, the rules are very unclear 🤷 |
tellthemachines
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.
Code LGTM and is working well! Caption controls don't show in write mode (or in zoom out mode for that matter). Captions still display if added in design mode.
|
Flaky tests detected in bd675b5. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17257071814
|
Same, I think we're feeling some of these things out as we go. While we still have the mode largely hidden behind an experiment, I'm comfortable enough with landing some of these changes (and reverting where needed). It'll be interesting to see overall how it feels as we attempt to simplify / hide things. It could be that we wind up having to make some of these things visible again if it feels like we've pulled too much back. In any case, thanks for the discussion and review here! I'll merge this in now. |
What?
Part of #65778
In the Audio and Video blocks hide the caption controls when in contentOnly mode.
Why?
As discussed in #65778 (comment) the idea is that write mode is for editing existing content, not introducing new material such as captions. The Image block already hides the Caption control, so this PR extends that to the Audio and Video blocks, helping to improve consistency.
How?
useBlockEditingModecalls to the Video and Audio blocks and only show the Caption controls when we're in the default block editing mode (hasNonContentControls, which is the same check used in the Image block)Testing Instructions
Screenshots or screencast