In practice
Links must be real anchor elements with an href. A click handler on a div is invisible to a crawler.
Audit with the URL inspection tool’s rendered HTML, which shows what the engine actually assembled.
Why it matters
Crawlers do run JavaScript, but on a delay and a budget, so heavy pages get partially processed.
Most “Google can’t see our content” cases resolve to a link, a route or a fetch that only exists client-side.