You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
PageSpeed Insights reports the following when the active theme is storefront:
This is caused by the handheld footer bar search. The tag that is used contains an empty href attribute which affect the SEO scoring.
Describe the solution you'd like
There are two solutions to implement this enhancement:
Removal of the href attribute. The href attribute in an tag is optional based on the information found on whatwg.org:
If the a element has no href attribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant, consisting of just the element's contents.
Provide content for the href attribute of the search. By changing the value of the href attribute to javascript:;. This can be done by changing line 706 in the storefront-woocommerce-template-functions.php file. From:
Change the value of the href attribute to #. This is not acceptable as this could be a valid link in HTML5.
Applying the change via a child theme. This solution would work take extra effort for users of the storefront theme. The user need to change the functions.php of their storefront child theme by adding:
This is what I’ve done:
Through ftp go to /themes/inc/woocommerce/storefront-woocommerce-template-functions then search for storefront_handheld_footer_bar_search probably line 715.
Modify echo '<a href=""' for echo '<a href="#"'.
This way Google Pagespeed Insight mobile search error it’s solved.
However, keep in mind every time parent theme it’s updated, you got to do it again.
Is your feature request related to a problem? Please describe.
PageSpeed Insights reports the following when the active theme is storefront:
This is caused by the handheld footer bar search. The tag that is used contains an empty href attribute which affect the SEO scoring.
Describe the solution you'd like
There are two solutions to implement this enhancement:
javascript:;
. This can be done by changing line 706 in the storefront-woocommerce-template-functions.php file. From:to
Describe alternatives you've considered
#
. This is not acceptable as this could be a valid link in HTML5.The text was updated successfully, but these errors were encountered: