Detailed answer
Use a real anchor with href pointing to an available destination and descriptive link text.
Script-only navigation is less robust. Internal links should help people find related information rather than repeat the same keyword mechanically. Verify important destinations directly after deployment, including links from nested pages.
Example
<a href="/forums/topic/html-label-for/">How labels connect to form inputs</a>
Understanding the behavior
An ordinary anchor with a real href exposes a destination that people and crawlers can follow. Descriptive link text explains what the destination offers. A click handler on an unrelated element does not provide the same baseline behavior.
Practical implementation notes
Test opening the destination in a new tab and copying the link address. Keep important learning pages reachable from navigation and contextual links rather than depending entirely on a client-side search box.
How to check it
Replace it with an anchor to a real URL and open the link in a new tab.
Expected result
Navigation remains usable without depending solely on the handler.
Watch out: An anchor without href is not an ordinary navigable link.
Read the reference ↗