DEV Community

Discussion on: Ditch the DOM with SolidJS and Skia CanvasKit

Collapse
 
jonrosedev profile image
jonrose-dev

Sorry if I missed it but I see no mention of accessibility. Rendering your entire UI into a canvas will make your app entirely inaccessible

Collapse
 
raibtoffoletto profile image
Raí B. Toffoletto

My thoughts exactly. Rendering a whole website into canvas makes me remember of full Flash web pages.

Collapse
 
whoisryosuke profile image
Ryosuke

This is what most graphic libraries like ThreeJS do today. And there are known accessibility techniques for this (as there were for Flash - added later and never used by anyone though).

Why even make graphics if the user won't see them and only have them described? Because we're designing experiences for everyone. In 40 years we're going to have holographic 3D UIs, I'd like to think they'll be accessible to most if people try and envision how.

The unification of our UI rendering is one of the first ways. "Web views" do a decent job at the cost of poor performance - so what does the future look like? Probably closer to the metal/GPU.

Collapse
 
whoisryosuke profile image
Ryosuke

Yep I didn't touch on it here. I have a whole article I'm thinking about writing about this since it's such a longer topic.

Basically you could do a similar approach to react-three-a11y, where they create a <A11y> component you can wrap things in, which will then insert and create DOM elements with the proper Aria tags. That's technically the "best" way since you don't reinvent accessibility features and leverage the browser.

My goal with this though was to try and focus on the universal aspect. I'm ditching the DOM because I might want to try and render this same UI on native platforms like iOS and Android, and use the Skia libraries there (probably C++). And in those cases -- I wouldn't be able to leverage the DOM, and I'd have to have native modules to handle accessibility for different device standards. So I tried to make this abstract enough to pull into those environments when I feel like experimenting.