←back to thread

277 points merqurio | 1 comments | | HN request time: 0.198s | source
Show context
Muromec ◴[] No.45113989[source]
I had lit in a project at work and not having to deal with it anymore is just great. We already have another heavier component framework to do the actual application stuff anyway, so having two just because somebody wanted to optimize their resume was such a drag.

It all looked nice in theory, but one thing shadow DOM makes worse is A11y, because element ids are now scoped and all the missing describe-by, label-for for things that should link to other side of the fence are a massive pain in the ass.

Big part of it is just skill issue on our part of course.

replies(4): >>45114885 #>>45117839 #>>45127177 #>>45149778 #
kubb ◴[] No.45114885[source]
Shadow DOM is optional in Lit - you can just disable it on a per-component basis.
replies(2): >>45116012 #>>45116762 #
sauercrowd ◴[] No.45116012[source]
causes a bunch of things to no longer work though - slots, style encapsulation, ...
replies(2): >>45116907 #>>45120325 #
kubb ◴[] No.45116907[source]
If you need style encapsulation, use the Shadow DOM. Slots still work IIRC.
replies(1): >>45117025 #
1. jfagnani ◴[] No.45117025[source]
Slots definitely don't work without shadow DOM and there's really no way to make them work. It's the biggest problem with turning shadow DOM off.