A link is an anchor element with an href attribute. Anything else that navigates when clicked may work perfectly for people and does not exist as a link for crawlers — which means whatever it leads to may be unreachable.
This is the most consequential JavaScript SEO issue, because it does not degrade a page; it removes parts of the site from discovery entirely.
What counts and what does not
- Crawlable:
<a href="/page/">. This is the only reliable form. - Not crawlable: a
<div>or<span>with a click handler. - Not crawlable:
<a>with no href, orhref="#"with a handler doing the navigation. - Not crawlable: a
<button>that navigates. - Unreliable:
href="javascript:void(0)".
The distinction is not about JavaScript being present. A real anchor enhanced with JavaScript is fine — the href is still there to follow if the script does not run.
Where this bites
Navigation menus
Script-driven menus can leave entire sections with no crawlable route. If the menu is the only link to a section, the section may be effectively invisible.
Faceted navigation and filters
Usually deliberate — you often do not want filters crawled. It becomes a problem when a filtered view is the only route to a set of products. See faceted navigation SEO.
Pagination
A “load more” button with no underlying paginated URLs means everything past the first page has no crawlable path. See pagination SEO.
Single-page applications
Framework routing that intercepts clicks is fine when built on real anchors. Where routes are triggered by handlers on non-anchor elements, the application has no crawlable structure at all.
The consequence
Pages reachable only through non-links behave as orphans — discovered through the sitemap at best, crawled rarely, and receiving nothing from the rest of the site. See orphan pages.
Checking it
- Disable JavaScript and try to navigate the site. What you can still reach is roughly what a crawler reaches without rendering.
- Crawl with JavaScript rendering off, then on, and compare the URL counts. A large gap is the finding.
- Inspect the actual markup of your main navigation — is it anchors, or divs with handlers?
- Check whether important sections appear in a crawl at all.
Fixing it
Use real anchors with real hrefs, and attach behaviour to them rather than replacing them. Progressive enhancement is the whole answer: the href works without JavaScript, and the script improves the experience when it runs.
This is almost always a small change in the templates and almost never requires rearchitecting anything.
Frequently asked questions
Google renders JavaScript — is this still an issue?
Rendering executes scripts; it does not click things. A link that only exists after a click event is never followed.
Does the sitemap cover it?
It helps discovery and does not replace links. The pages still receive nothing internally.
Are onclick handlers always bad?
Only when they replace an href. An anchor with both is fine.
What about infinite scroll?
Same principle — it needs real paginated URLs underneath. See infinite scroll SEO.
Consulting CTA
If sections of your site are not being crawled, book an SEO consultation. See also JavaScript SEO.