Hacker News new | ask | show | jobs
by sidcool 1764 days ago
I am not a UI dev, but I have seen some noise about using Canvas based text rendering. What is HN's opinion on this?
2 comments

Sounds awful. No accessibility to screen readers. It's raster-based so you can't zoom. No text selection or copying. And that's just what I thought of off the top of my head...
Totally agree.

There is one reason I can see for using canvas based rendering generally[1] and that is if one really really wants to avoid someone from copy-pasting or indexing the page easily[2].

[1]: valid use cases for using canvas exists.

[2]: as someone who has digitized a couple of documents I'd say the effort is just above copy paste (with my tools it is copy, paste, OCR to clipbord, paste, verify)

Shouldn't screen readers use OCR? I mean OCR is basically a solved problem, and there are situations when you want to read what's in an image, or when the HTML is a mess.
There's more to screen readers than characters, otherwise we wouldn't even need aria attributes.

Also OCR is a solved problem if we ban any form of display/script font types.

Yeah, you'll probably get the best experience if the web developer specifically designs for accessibility. I guess the problem is that it doesn't happen as much as we'd like.
Try any Flutter-based website and see for yourself!

Hint: It’s J A N K Y