You can barely trust a typical Web site to run Javascript in your browser without leaking personal information to God knows who. I'm not going to trust them with a full-blown rendering engine.
Comparison with Flash et al. is not accurate anymore, since these ran in an unprotected environment. Also, they were cumbersome install whereas WASM apps don't need installation (but can live in a cache if desired, and could even be shared among websites).
Fundamentally the problem is the conflict between the browser as an 'app' platform and the browser as a document viewer. Put simply, would you rather your user interface be 1) a magnificent piece of software with thousands of man-years put into it, debugged over decades, where every use case has been meticulously considered, or 2) a shitty script written by an overworked web developer?
As a anadotal. We can already fo to websites that run vms and emulate old operating systems. I dont this it is far fetched to run a web browser in a web browser.
In fact, the approach would be more general, since a lot of text is already embedded in images on a lot of websites (think also about ads).
The simplest example: how do you indicate a graphic or piece of text is a button or link? How do I set the alternate text if it’s a graphical button.
Besides, nobody says we can't have a protocol for some additional accessibility information.
1. No-one uses it
2. There is only 1 implementation, and it is never updated
And then we wonder where all the software bloat comes from.
Not to mention that there's no such thing as "Easily run OCR", considering how many weird fonts there are, and that they could be rendered in such small size as to make it difficult even for humans to tell them apart.
It sucks but this is the way we're heading. I'm not sure web devs will even be writing HTML in 5 years beyond adding a canvas tag.
So why doesn't everyone roll their own? Some issues:
- footprint - that whole runtime has to come across the wire just to render "hello world"
- javascript's single-threaded tendencies make perf a big challenge
- text rendering [this happens to be the thing the document-focused Web really excels at]
- text semantics [SEO]
- gigantic implementation effort [custom engines RARELY make sense even for the demands/budgets/returns of AAA games; how many websites justify this kind of investment?]