This change was made because the advice was "out of date" and Google handles JavaScript fine.
Learn how the DOM structures your page, how JavaScript can change it during rendering, and how to verify what Google actually sees.
Google removed its JavaScript accessibility guidance from help documents, saying the advice is outdated and noting it has rendered JavaScript for years.
Google updated its JavaScript SEO best practices document with a new section on how to set the canonial URL when using JavaScript. Google wrote, "The best way to set the canonical URL is to use HTML, ...