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

Semantics of output HTML for Cover Image BLock #11083

Closed
joedolson opened this issue Oct 25, 2018 · 12 comments
Closed

Semantics of output HTML for Cover Image BLock #11083

joedolson opened this issue Oct 25, 2018 · 12 comments
Labels
Needs Design Feedback Needs general design feedback.
Milestone

Comments

@joedolson
Copy link
Contributor

The output of the cover image block is a div with a background image wrapping a paragraph containing the cover text.

I think we need to consider whether or not this text represents a heading in usage. Visually, it functions like a heading, and I think it's likely people will use it as a heading. It should certainly be possible for it to be marked up as a heading.

If this has previously been considered, I couldn't find the record of it.

@designsimply
Copy link
Member

Adding a screenshot and sample output code for reference:

screen shot 2018-10-25 at 4 23 00 pm

<div class="wp-block-cover has-background-dim alignfull" style="background-image:url(http://alittletestblog.com/wp-content/uploads/2018/08/IMG_20180728_191422.jpg)"><p class="wp-block-cover-text">Cover Block</p></div>

To clarify, are you proposing that p be changed to h2 in this output?

@designsimply designsimply added the Needs Design Feedback Needs general design feedback. label Oct 25, 2018
@mor10
Copy link
Contributor

mor10 commented Oct 25, 2018

Agree. In the particular screenshot above, the text is likely not a heading, but in other examples, including the prototype where the cover image and text were displayed at the top of a view, it would be used as a heading. There should be a way of indicating whether the text is descriptive, a quote, heading, or something else. I've already seen people use this feature for all three situations.

@joedolson
Copy link
Contributor Author

I don't think that we can set a pre-established semantic purpose for this text; it will vary based on use, and it needs to be possible to adjust the semantics.

Even as a heading, it's not enough to set a specific heading; those should be options that are conditionally generated based on the block's position within the overall post.

Since there are multiple plausible use cases, I think the block should be able to serve multiple cases.

@mtias
Copy link
Member

mtias commented Oct 27, 2018

The consideration here was to allow any kind of block to be added as a nested block.

@joedolson
Copy link
Contributor Author

Are you saying that it's possible to insert a heading block inside a cover block?

How does that work? I've spent the last 15 minutes exploring, trying to see how I would do something like that, but I can't find anything.

@samikeijonen
Copy link
Contributor

Are you saying that it's possible to insert a heading block inside a cover block?

It's not possible (yet). Originally the text was hardcoded h2 which was may or may not been correct heading level.

@samikeijonen
Copy link
Contributor

Very early conversation was at least in #2902.

@samikeijonen
Copy link
Contributor

I was thinking the same issue for the Media and Text block.

@mtias
Copy link
Member

mtias commented Oct 30, 2018

Are you saying that it's possible to insert a heading block inside a cover block?

No, it was tried but was not merged: #5452

Still consider it to be the right solution.

@joedolson
Copy link
Contributor Author

That does seem like a viable solution, although it looks like it hasn't had any action in some time; is there any ongoing work on that?

@mtias
Copy link
Member

mtias commented Oct 30, 2018

It was reverted because the UI of nested blocks was a bit overwhelming at the time. It's much better now, but it's a significant change. It's something we can bring back in a future release.

@mapk
Copy link
Contributor

mapk commented Mar 8, 2019

This should be fixed with #13822. Now you can add nested blocks inside the Cover block.

@mapk mapk closed this as completed Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

No branches or pull requests

8 participants