Hacker News new | ask | show | jobs
by efficax 118 days ago
Not a word in here about accessibility, of course. If you’re blind you’re blind to the canvas as well without a lot of work, it’s much more straightforward to make the DOM accessible
2 comments

It says:

> For most web apps, the DOM remains the better choice. It gives you accessibility, responsive layouts, text selection, input handling, and countless other features for free

Ah, so literally a word.

I was thinking you could probably get a fair bit of accessibility by using <div>s for your text rendering- or by maintaining a separate, hidden outline of DOM elements mirroring what’s on screen.

> maintaining a separate, hidden outline of DOM elements mirroring what’s on screen.

Is there any analysis on the efficacy of this approach? This is always my first thought in these discussions. Performance of WASM with native text IO. Being fully "hidden" one could just use semantic elements, skipping most layout div's, maybe in turn reaping untold accessibility benefits?

Being such a simple idea I cannot believe that it wasn't tried and abandoned before.

Yep. Accessibility isn't just a nice to have. Its a legal requirement for a lot of websites under the ADA (Americans with Disabilities Act).