wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

New FAQ block text format

Open QROkes opened this issue 6 years ago • 33 comments

  • [x] I've read and understood the contribution guidelines.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

Using the new FAQ block and trying to give some format to the answer, I tried "pre", "ul/li" and "p" and it was not possible. After "editing in html" wordpress ask me convert to block because it was modified and remove all these changes.

Please describe what you expected to happen and why.

Would be nice having an option to add some basic format to the answers.

  • Enter insert a "br" instead a new paragraph "p". Would be nice have more than one paragraph for answers.
  • Lists "ul/li" and "pre" should be allowed.

How can we reproduce this behavior?

  1. Add a new FAQ Block (yoast).
  2. Edit as HTML and try to add a "pre" formating.
  3. Come back to edit visually.
  4. WP will ask you to convert to block, after that, the new "pre" tags added will be removed.

Technical info

  • WordPress version: 4.9.8

  • Yoast SEO version: 8.2

  • If relevant, which editor is affected (or editors):

  • [ ] Classic Editor
  • [x] Gutenberg
  • [ ] Classic Editor plugin
  • Which browser is affected (or browsers):
  • [ ] IE11
  • [ ] Edge
  • [ ] Chrome
  • [x] Firefox
  • [ ] Safari
  • Relevant plugins in case of a bug:
  • Tested with theme: Genesis Framework

QROkes avatar Sep 16 '18 23:09 QROkes

Thank you for reporting this issue. We'll discuss this enhancement internally to see if it is something we can and will add.

CarolineGeven avatar Sep 28 '18 10:09 CarolineGeven

This suggestion also aligns with Google's recommendations:

The full answer to the question. The answer may contain HTML content such as links and lists. Valid HTML tags include: <h1> through <h6>, <br>, <ol>, <ul>, <li>, <a>, <p>, <div>, <b>, <strong>, <i>, and <em>.

Being able to use lists in the Answer field would be really useful.

mikalehmann avatar Jul 12 '19 15:07 mikalehmann

Please inform the customer of conversation # 541800 when this conversation has been closed.

rmarcano avatar Sep 18 '19 07:09 rmarcano

Please inform the customer of conversation # 542502 when this conversation has been closed.

Pcosta88 avatar Sep 19 '19 19:09 Pcosta88

Also, each question should contain an individual "id" for better linking. <h3 id="first-question">

QROkes avatar Sep 30 '19 03:09 QROkes

Please inform the customer of conversation # 556923 when this conversation has been closed.

Pcosta88 avatar Nov 08 '19 13:11 Pcosta88

Has there been any progress with adding support for the ul, ol and li tags in the How To and FAQ blocks?

bubblund avatar Jan 03 '20 23:01 bubblund

This has no priority at the moment, as far as I know.

Djennez avatar Jan 06 '20 07:01 Djennez

Please inform the customer of conversation #616555 when this conversation has been closed.

Pcosta88 avatar Jun 01 '20 12:06 Pcosta88

Request to replace the <strong> tag with `a <div>

priscillamc avatar Jun 04 '20 00:06 priscillamc

The UL/OL/LI tags are especially important when it comes to giving clear short-form answers to questions.

lazharichir avatar Jun 19 '20 11:06 lazharichir

I need at least LISTS there too.

webprom avatar Jun 28 '20 13:06 webprom

+1 for ul / ol / li

Bylyme avatar Aug 17 '20 17:08 Bylyme

+1

It would be already sufficient, if the block does not collapse, if you insert a list via the HTML editor.

mkronenfeld avatar Oct 15 '20 13:10 mkronenfeld

+1 for ul / ol / li

acegoulet avatar Oct 22 '20 20:10 acegoulet

+1 - this block is necessary for well-built sites that contain an FAQ, but the lack of at least a ul option is pretty limiting.

eric-michel avatar Nov 05 '20 16:11 eric-michel

Please inform the customer of conversation # 674678 when this conversation has been closed.

michaelbriantina avatar Dec 02 '20 08:12 michaelbriantina

Please inform the customer of conversation # 668719 when this conversation has been closed.

Pcosta88 avatar Dec 02 '20 15:12 Pcosta88

I will close this issue since I stopped using Yoast and also I built my own FAQ block and this issue is now solved for me. After more than 2 years open seems like it's not a priority here.

QROkes avatar Dec 03 '20 20:12 QROkes

Do we have a timeline for when this potentially could be included?

Telsenome avatar Feb 04 '21 10:02 Telsenome

The same question here - Any timelines for tags? Especially for ul/ol/li/p?

iryska avatar Apr 23 '21 11:04 iryska

I will close this issue since I stopped using Yoast and also I built my own FAQ block and this issue is now solved for me. After more than 2 years open seems like it's not a priority here.

@QROkes is it possible for us to get a copy of your FAQ solution?

schutzsmith avatar Jul 15 '21 12:07 schutzsmith

@michaelbriantina @moorscode @Djennez Is the addition of being able to use list items in the FAQ Block on your timeline at all? Trying to get a sense if we should wait for a fix or look for a different solution.

schutzsmith avatar Sep 07 '21 13:09 schutzsmith

@schutzsmith just create your own block and use the "classic editor" inside your block instead of the "rich text" used by Yoast. Also, you can integrate your own SEO, for example, I decided to integrate my block with the Genesis Framework and take advantage of the Microdata markup, that in this specific case (FAQ pages) is better than the JSON solution implemented by Yoast that result very inefficient causing in some cases having pages unnecessarily of the double of the normal size because all the content is duplicated in the JSON.

QROkes avatar Sep 07 '21 15:09 QROkes

@schutzsmith just create your own block and use the "classic editor" inside your block instead of the "rich text" used by Yoast. Also, you can integrate your own SEO, for example, I decided to integrate my block with the Genesis Framework and take advantage of the Microdata markup, that in this specific case (FAQ pages) is better than the JSON solution implemented by Yoast that result very inefficient causing in some cases having pages unnecessarily of the double of the normal size because all the content is duplicated in the JSON.

Thanks for the insight!

schutzsmith avatar Sep 08 '21 13:09 schutzsmith

Resurrecting this issue.

I have a working prototype of an FAQ block that closely follows how Yoast's FAQ block creates its schema, but allows much more flexibility in markup.

It functions with a combination of two blocks: the FAQ wrapper block, and an FAQ Answer block.

The FAQ wrapper block simply contains InnerBlocks with a locked block template of a single Heading block (the question) and an FAQ Answer block (the answer). This allows the question to be any level of heading (not just <h2>).

The FAQ Answer block contains an InnerBlocks that is limited to Heading, Paragraph, and List blocks. This allows for the full range of HTML tags that the schema supports:

The answer may contain HTML content such as links and lists. Valid HTML tags include: <h1> through <h6>, <br>, <ol>, <ul>, <li>, <a>, <p>, <div>, <b>, <strong>, <i>, and <em>.

The block injects the appropriate schema data via Yoast\WP\SEO\Generators\Schema.

Any number of FAQ blocks can be added to the page, and are not locked to a single overall wrapper block that forces them to be in a single place (so you can have regular content separating questions).

Is there any interest from the Yoast team in integrating this block into wordpress-seo proper? I would be happy to contribute, but don't want to rework this into an appropriate PR if there isn't any momentum behind this issue. I would also need help from someone to create an appropriate upgrade path from the existing FAQ block to this new one as they're so different.

eric-michel avatar Apr 01 '22 15:04 eric-michel

+1 https://wordpress.org/support/topic/yoast-blocks-are-not-popular-for-this/

michaelbriantina avatar Apr 29 '22 06:04 michaelbriantina

Please inform the customer of conversation # 908094 when this conversation has been closed.

ogodoabiola avatar Jun 22 '22 14:06 ogodoabiola

@eric-michel Did you submit a pull request with your prototype or do you have it somewhere you would be willing to share? I'd love to get this functionality into a site I'm building.

colinduwe avatar Sep 13 '22 16:09 colinduwe

@colinduwe Unfortunately I never got any response from someone willing to help me out with a PR, so I never reworked it. It's also not really in a refined state (more of a proof-of-concept at the moment), but if all goes according to plan I'll be using it on a site soon and will get it cleaned up and documented in the next couple months. I'll see about sharing the code then (originally I gave a link but just realized it's a private repo at the moment, and I need to check with others on whether we're willing to share it with folks other than Yoast).

eric-michel avatar Sep 13 '22 19:09 eric-michel