DEV Community

Discussion on: Ditch the DOM with SolidJS and Skia CanvasKit

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.