That dream is already here if you use Clojure, and it's great! Web assembly makes me very bullish on this kind of setup. Maybe we won't even be targeting the DOM in the future?
Unless the other thing you target instead is similarly well-developed, you're gonna have real trouble with accessibility.