There was an old SEO joke. What does an SEO have for breakfast? Java and spam. Ok I didn’t say it was that funny but I like it.
There has always been discussion about ajax, java, server side rendering, browser rendering, what can Google see, what can crawlers see, and yes some of it is indexable and some of it is crawlable but why risk it.
The simple <a> tag is the safest way to make a link. There was also some good advice if something changes something on the page use a button, if something links off to other content use a link, and the safest link is an <a> tag. It really does seem as in this modern crazy word of dynamic pages K.I.S.S. still applies. Keep It Simple Stupid.