A click handler on a div can look like a link, but it does not provide the same native behavior. Use an anchor with an href for navigation, then add JavaScript only for enhancements.
<a href="/en/tutorials/example/">Read the tutorial</a>Keep the destination in the markup
- Let users open a link in a new tab, copy its address, and activate it with a keyboard.
- Do not leave the href empty or set it to # when the control is meant to navigate.
- For actions that change state rather than navigate, use a button and give it a clear accessible name.
Check the server-rendered page
Inspect the raw HTML or use a text-only request to confirm important links and labels are present before hydration. Client-side navigation can still make transitions faster, but the normal URL remains the source of truth.
This improves usability and creates clear crawl paths. It does not mean every JavaScript page is invisible to Google; it means essential navigation should not depend on uncertain rendering behavior.
