Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Jetpack Search Block: Incorrect Heading sequence for filters in Footer Widget #38930

Open alinclamba opened 3 months ago

alinclamba commented 3 months ago

Impacted plugin

Jetpack, Search

Quick summary

When the Jetpack Search block is added to the footer widget area, the filter headings are generated as H4 without a preceding H3, which can negatively impact SEO due to improper heading hierarchy.

Issue reported by a user here: 8599734-zd-a8c

Steps to reproduce

  1. Go to Appearance > Customize > Widgets > Footer.
  2. Add the Jetpack Search block to the Footer widget area.
  3. Enable filters (Tags, Categories) within the Jetpack Search block

FiJ0ax.png

A clear and concise description of what you expected to happen.

The filter headings should follow a sequential heading order, ideally starting with H3, or there should be an option to customize the heading level.

What actually happened

The filter headings are automatically generated as H4, despite no H3 heading preceding them, which may cause SEO issues.

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

If the above answer is "Yes...", outline the workaround.

No direct workarounds within the block settings. A custom CSS workaround can be implemented, but it requires manual intervention and it doesn't solve the issue, as it can only eventually style the H4 to look like H3, but it's not what user really needs.

Platform (Simple and/or Atomic)

No response

Logs or notes

No response

github-actions[bot] commented 3 months ago

Support References

This comment is automatically generated. Please do not edit it.

DustyReagan commented 3 months ago

I started to make this change from an H3 to an H4, but it occurred to me that this could be a "breaking change" to users who have custom CSS selected on this H4 tag. Thinking about this issue a little further, we could make this a user option, but that will require adding complexity to the UI. So, I started a discussion (p1724940143519689-slack-C029GN3KD) on the SEO benefits. It seems that the H4 tag could potentially be beneficial in giving more SEO "weight" to the content above it. So, even though an H3 tag might be more semantically correct, the SEO benefits of updating the tag are up for debate.

I believe this leaves the options of making this a user setting or leaving the tag as it is. For now, I've decreased this issue's priority to "normal."