For canvas rendering in general, this is essentially what Flutter and a lot of newer GUI frameworks like Composer Multiplatform and Rust based GUIs do. Accessibility is possible for these as there is semantic tree support but it's not as "free" as the DOM so it takes a bit more work.
You might want to build your WebApp in Canvas instead of HTML
41–50 of 59 posts
Re: You might want to build your WebApp in Canvas instead of HTML
#42Canvas will be increasingly popular in the arms race against ad blockers.
Interactive Flash Banner Ads Animation from the 2000s https://www.youtube.com/watch?v=w0Lu8BsjvK0
Re: You might want to build your WebApp in Canvas instead of HTML
#43Re: You might want to build your WebApp in Canvas instead of HTML
#44There is no such a thing as a "WebApp". There are "web pages", which are just plain text html downloaded over http (or even ftp). In 99.9% of the cases it's completely enough.
Re: You might want to build your WebApp in Canvas instead of HTML
#45Please don't do this. Native controls have dozens to hundreds of subtle UI interactions. Consider a text input element. On macos there are text shortcuts - cmd+A to select all. cmd+left / right to go to the next or previous word. Page up / page down. Home / end. Spell check. A right click menu with about 10 more options, including OS based text services. Tapping on a text input element on ios or android will pull up…
> for most web apps, you’re much better off with good old DOM elements. Take the humble element, for example. With it, you get crispy rendering at any resolution, support for tab, focus, selection, mouse interactions and arrow key navigation, internationalization for right-to-left text and Asian compound characters, accessibility for screen readers…
Re: You might want to build your WebApp in Canvas instead of HTML
#46Earlier quoted context omitted.
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 s for your text rendering- or by 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.
Re: You might want to build your WebApp in Canvas instead of HTML
#47Re: You might want to build your WebApp in Canvas instead of HTML
#48There is no such a thing as a "WebApp". There are "web pages", which are just plain text html downloaded over http (or even ftp). In 99.9% of the cases it's completely enough.
There is absolutely such a thing as a web app. What else would you call Google Docs, MS Word and the like?
Re: You might want to build your WebApp in Canvas instead of HTML
#49Please don't do this. Native controls have dozens to hundreds of subtle UI interactions. Consider a text input element. On macos there are text shortcuts - cmd+A to select all. cmd+left / right to go to the next or previous word. Page up / page down. Home / end. Spell check. A right click menu with about 10 more options, including OS based text services. Tapping on a text input element on ios or android will pull up…
Please read TFA > for most web apps, you’re much better off with good old DOM elements. Take the humble element, for example. With it, you get crispy rendering at any resolution, support for tab, focus, selection, mouse interactions and arrow key navigation, internationalization for right-to-left text and Asian compound characters, accessibility for screen readers…
There are a lot of comments in this thread excited by the idea of turning my web browser into a dumb frame buffer for someone’s home grown, laggy, half baked UI framework that cannot function on par with the DOM for hard technical reasons. I don't want to run software like that.
Re: You might want to build your WebApp in Canvas instead of HTML
#50The dev tools in the browser become much more useless when you draw everything in a canvas. It's gonna be sad when everyone starts using frameworks that draw on canvases. Arguably more sad than when Webassembly came. One could probably write new dev tools for those frameworks though. I also imagine this will be a big setback for web accessibility.
yes, and a big setback for the companies that do this when all the accessibility lawsuits hit them.