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
When using a passive node for structural distinction, google page speed flags that anchor element as "not crawlable link" and hurts the SEO score awarded to page because there is no href on an anchor tag.
What's your proposed solution?
The passive node should default with href="#" automatically, and possibly aria-hidden=true attribute. The href="#" solves the Pagespeed issue.
Additional context
While the passive node is a good designation for labels and headers on navigations, especially footers, it should probably be a tag instead, but understandably, there are probably a lot of legacy anchor tag styles involved.
I’m hesitant to add href=# because I’m not sure how “safe” this is for everyone and the multitude of sites out there. But it might have to be a stop-gap for now.
The proper fix for this is probably to change to HTML tag used to <span>, but that’s going to be a breaking change for people staying navigation nodes and assuming everything is a <a>. I’ll have to introduce a getTag() function for node types.
I’m not sure if you want to add aria-hidden=true as that will hide the node from screen readers?
This also only affects the use of craft.navigation.render() as with custom rendering you have full control over the output.
I'll admit that I've not had time to properly research alternatives, so thanks for chiming in with role="none". I'll look into it further, but that sounds much better!
What are you trying to do?
When using a passive node for structural distinction, google page speed flags that anchor element as "not crawlable link" and hurts the SEO score awarded to page because there is no href on an anchor tag.
What's your proposed solution?
The passive node should default with href="#" automatically, and possibly aria-hidden=true attribute. The href="#" solves the Pagespeed issue.
Additional context
While the passive node is a good designation for labels and headers on navigations, especially footers, it should probably be a tag instead, but understandably, there are probably a lot of legacy anchor tag styles involved.
#183
The text was updated successfully, but these errors were encountered: