1.4 Rendering & JavaScript ✦HighVerified
Links as span/div with JS onclick
Google follows real anchor tags with href attributes. A span or div wired up with a JavaScript onclick looks like a link to a user but is invisible as a link to a crawler.
What it is
Navigation uses non-anchor elements with handlers.
Why it matters
Google primarily follows real <a href> links; JS-handler ‘links’ may not be crawled, breaking discovery.
How to fix it
Use real <a href> anchors for navigation.
How to find it on your site
- Inspect navigation elements and check they are anchor tags with href, not span or div with onclick.
- Crawl the site and see whether those destinations are discovered.
- Replace scripted click handlers with proper anchor elements.
- Keep JavaScript enhancements layered on top of real links.
Cross-reference to ranking and citation factors
Only resolvable href links pass crawl paths and link signals. Scripted pseudo-links break both.
Impact
Medium-high; discovery. Direct.
Evidence
Use proper <a href> links so Google can follow them. Google Search Central, Understand JavaScript SEO Basics; Google Search Central, SEO Starter Guide
Sources