Gutenberg: Remove the SEO settings block from the nav block

Created on 15 Jun 2020  路  5Comments  路  Source: WordPress/gutenberg

Describe the bug
I was testing the Nav block and saw the SEO settings block:

Screenshot 2020-06-15 at 11 33 22

I think it's problematic to add this to core. The wording is already wrong (as this is a hint and not a "rule", like robots.txt is) and it links to a Codex page that is outdated.

We've seen over the past few months that different SEO plugins chose to word these options differently, because of a difference of opinion in how this should work and also a difference in how they perceive their audience.

Also, the _large_ majority of WordPress users should _not_ use this toggle, like, ever. Which makes it risky to add this.

I strongly feel therefor that this should be plugin territory and should _not_ be dealt with in core. If we do decide to ship this in core, the wording should be changed, the linked-to page should be updated and it should still become filterable.

To reproduce
Steps to reproduce the behavior:

  1. Open a post
  2. Insert a Navigation block
  3. Add a link and select it
  4. See the SEO settings block in the block sidebar

Expected behavior
Don't have a default SEO settings block, allow plugins to filter and add a block like this themselves.

Editor version (please complete the following information):

  • WordPress version: 5.4.2
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? Gutenberg plugin
  • If the Gutenberg plugin is installed, which version is it? 8.3
[Block] Navigation [Status] In Progress

Most helpful comment

I dug into why this attribute was added and found https://github.com/WordPress/gutenberg/issues/13690#issuecomment-460986534.

We need to support setting the rel attribute in some capacity so that we maintain backwards compatibility with the existing nav-menus.php screen which, when you enable it in Screen Options, lets you set the rel attribute using a text field.

Screen Shot 2020-07-07 at 11 25 22

It's also worth noting that the Buttons block supports setting the rel attribute using a text field.

Screen Shot 2020-07-07 at 11 57 42

Instead of removing the _SEO settings_ panel, let's replace it with the same _Link settings_ panel that the Buttons block has.

All 5 comments

Isn't nofollow traditionally accompanied by noopener noreferrer which are mostly security & privacy-related?
I agreed we should remove the "SEO" section, but perhaps we should change the setting to include the other 2 properties as well - and tweak the description accordingly?

Couple of remarks:

  • I don't think these things have anything to do with each other, noopener is added to plenty of links in WordPress without user interaction.
  • noreferrer was only added to noopener because for a while, Firefox didn't support noopener, you shouldn't use that anymore, it breaks referrer analytics.

Didn't know that, thanks!

I dug into why this attribute was added and found https://github.com/WordPress/gutenberg/issues/13690#issuecomment-460986534.

We need to support setting the rel attribute in some capacity so that we maintain backwards compatibility with the existing nav-menus.php screen which, when you enable it in Screen Options, lets you set the rel attribute using a text field.

Screen Shot 2020-07-07 at 11 25 22

It's also worth noting that the Buttons block supports setting the rel attribute using a text field.

Screen Shot 2020-07-07 at 11 57 42

Instead of removing the _SEO settings_ panel, let's replace it with the same _Link settings_ panel that the Buttons block has.

Great idea! See the updated version of https://github.com/WordPress/gutenberg/pull/23682

Zrzut ekranu 2020-07-7 o 16 45 06

I wonder if some description there would be useful to explain what that field even is, probably an external link would be needed because of the volume of information - thoughts?

Was this page helpful?
0 / 5 - 0 ratings