3 ms·
What I hear you saying is you want me to do research for you. Ok, I'll bite, I'm retired with nothing better to do. The Guide to Accessible Web Components htt
by michaelwww 4y ago
What I hear you saying is you want me to do research for you. Ok, I'll bite, I'm retired with nothing better to do.
The Guide to Accessible Web Components
https://www.erikkroes.nl/blog/accessibility/the-guide-to-accessible-web-components-draft/ https://www.erikkroes.nl/blog/accessibility/the-guide-to-acc...
Server Side Render Web Components: It's a common myth that you can't server side render Web Components.
https://dev.to/steveblue/server-side-rendering-web-components-320g https://dev.to/steveblue/server-side-rendering-web-component...
Using SVGs in Lightning Web Components
https://developer.salesforce.com/blogs/2020/07/using-svgs-in-lightning-web-components https://developer.salesforce.com/blogs/2020/07/using-svgs-in...
There are various work around for global namespace problems
You're welcome
- dmitriid 4y ago> What I hear you saying is you want me to do research for you. What you hear is me asking a direct question and expecting a direct answer. All I hear in response is non-answers. > to do research for you. I wish it were research and not a couple of links you just grabbed from a quick Google search. > The Guide to Accessible Web Components Translation: the problem is not solved because Shadow DOM isn't accessible. Relevant quotes: """ Building proper UI Web Components can be quite a task though, especially if you want them to be accessible. As the shadow DOM is completely encapsulated and isolated, it is also completely disconnected. It's almost like it's a completely different document like an iframe. When one of both (the label or the input) is in the shadow DOM, they're in a completely different context. This makes it impossible to refer to eachother. This same dillema also goes for WAI-ARIA attributes like aria-labelledby, aria-describedby and other that reference an ID. You need either both elements in the shadow DOM, or both of them in the light DOM. """ I'll let you do the research further. The only "solution" on the horizon is manually adding more boilerplate Javascript to your components when Acessibility Object Model becomes available in the browser. > Server Side Render Web Components: It's a common myth that you can't server side render Web Components. It's not a myth. It's pure reality. Which you'd know about if you bothered to read the links you provide. The link even states this clearly: you can't render them. You have to use a very specific set of third-party tools that jump through hoops to provide the DOM object on the server. This is not a generic solution provided by the platform, you have to buy in to specific frameworks for this to work. > Using SVGs in Lightning Web Components And here we see that you didn't even understand the question. No one said you couldn't render SVG from custom components. However, you cannot do this: <svg> <x-axis min="2000" max="2019"/> <y-axis min="0" max="100"/> <scatter-plot points="..."/> </svg> because custom elements are HTML by definition (they extend HTMLElement). Totally incompatible with SVG. You'd know that if you had done actual research, and not spent your time attacking Rich Harris, or gushing how Google invests oney in some framework.
- michaelwww 4y agoFor the record, I didn't attack Rich Harris. I admire him. I said he was a fast talker with strong opinions and then "I like Harris' passion. He believes his way is the best. More power to him." It sounds to me like you went down the Web Components path and became very disillusioned. That's good to know. Maybe my enthusiasm is misplaced. My goal is to keep things simple. That's why I refuse to use React, Redux, Node, Gulp, Babel, blah, blah, build pipeline. I'm not building a Facebook clone. That's not simple. We have different goals then. That's fine. Thanks for the info.
- dmitriid 4y ago> It sounds to me like you went down the Web Components path and became very disillusioned. It sounds to me that all you can offer is demagoguery > My goal is to keep things simple. That's why I refuse to use React, Redux, Node, Gulp, Babel, blah, blah, build pipeline. Does it have anything to do with the question I asked? No.
- michaelwww 4y ago> Does it have anything to do with the question I asked? No. This thread is on a post about React. I'm not even sure what you want from me at this point. To prove that Web Components are better than React because I said React is tired and Web Components are wired? The "The self-fulfilling prophecy of React" article says React is tired. > It sounds to me that all you can offer is demagoguery I'm not trying to persuade anyone of anything. I'm saying I like Web Components. I haven't built a start up around them. I'm sure they fall short in many use cases.
- dmitriid 4y ago> This thread is on a post about React. This particular thread started when I replied to your claim about Web Components. I posited a simple question: have the problems listed at the link been solved? You spent an inordinate mount of time and words to avoid giving an answer. Hint: the anser is "no". > I'm not even sure what you want from me at this point. At this point? Nothing. About three replies ago I was still expected a clear honest answer.