I was talking with my partner and she is a web developer. I asked her if there was any web front end framework that exclusively used the canvas element for any ui. She said didn't know of any and that there'd be issues.
The UI framework I'm most familiar with is UIKit in iOS land. Could somebody whip something up in canvas using only javascript that could build be used as a UI framework?
You can! Are there problems! Definitely!
Accessibility is a huge issue. The canvas is just a bitmap to any screen reader which makes it very opaque to anybody using a screen reader.
You can't hyperlink into any part of the app. You'd have to do the same sort of "hack" that you have to do with direct links or universal links on mobile.
Built in backbutton support? Fuggedabout it!
I definitely think this is an idea worth exploring though. How nice would it be to work purely in javascript and not have to worry about styling with CSS or worry about the DOM... I think HTML and CSS are great for displaying documents on the web, and allow the fine grained support needed for rendering rich documents. I'm a biased mobile app developer though! Just give me a UI framework where you only need to know one language!
I'll hopefully have something up to show in the future that is more polished.
© 2024 radq.ca