Shoelace 2.0 release: UI toolkit that works with all frameworks or none at all
My biggest concern with using Shadow DOM for things like this is that it makes it depend upon JavaScript, which I strongly prefer not to do.¹ I know there’s some research work into declarative Shadow DOM², which has the potential to resolve this, but that’s still quite some way off. As it stands, I don’t feel comfortable using Web Components with Shadow DOM for things like this, which is a pity, because it’s a <i>delightful</i> way to work, and this toolkit looks very good in most regards. Instead, I like Svelte’s model which essentially allows you to <i>write</i> things this way, but have it result in light DOM, so that you can still do server-side rendering if you desire.<p>¹ Requiring JavaScript harms accessibility, especially for web <i>pages</i> (as distinct from web <i>apps</i>). It makes pages take longer to load, not be as spider-friendly, and be more fragile when JavaScript fails to load, whether deliberately or accidentally—and simple network failures and the likes break things more often than you might imagine. I myself browse the web with JavaScript disabled via uMatrix, mostly because it speeds the web up a lot on average. Privacy improvements are a distant secondary reason. When I encounter pages that require JavaScript, I either give up on them or open them in a Private Browsing window, where I don’t have the uMatrix extension enabled; or if it’s something I expect I may be using more than once or twice, I see about more precise whitelisting in uMatrix.<p>² <a href="https:&#x2F;&#x2F;github.com&#x2F;whatwg&#x2F;dom&#x2F;issues&#x2F;831" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;whatwg&#x2F;dom&#x2F;issues&#x2F;831</a>