Re: [w3c/webcomponents] The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. (#509)

Are there (medium+ sized) React Apps that have no-JS fallbacks beyond displaying a message "Please activate JS" or a static SSR view that has almost no UX and only a tiny (non-interactive) feature set of the complete app? I personally havent seen any and tbh i wouldnt even care (and lots of "average-webworker-joe" customers wouldnt either)

So why should webcomponents support more than these kind of fallbacks, if noone is goin to use them even in React, where it would be possible to fallback __very__ gracefully.

Imho webcomponents is a tool primarily for devs to create large apps more easily (just like vDOMs). I would argue that you can build anything you can do with webcomponents and/or React just with jQuery and/or vanilla ES3, it just has horrible DX. "But if Reacts DX is so great and it works, why not just stick to vDOMs?" -> because in a lot of cases you run into UX problems (performance / load time / FMP / TTI) sooner or later unless you use stuff like Service Workers, H2 Push and/or SSR, which introduce new complexities and decrease DX. its basically a game of whack-a-mole.

> precisely, a form or a list of images, as example, without special powers, without that carousel.

displaying a list of images insteadof a good slider is horrible UX. Displaying no images at all in this case is a viable solution. And this is just a very simple case.
What about a form to make a selection from thousends of options empowered by a search input that is backed by an elastic search. providing such functionality without JS is just a painful UX.

regarding your example: if i modify it to use one of my proposals, it would work just as well in a browser supporting it:
```js
document.body.innerHTML = '<my-input fallback="input">';
setTimeout(() => {
  customElements.define(
    'my-input',
    class extends customElements.withInterface(customElements.InputInterface) {}
  );
}, 2000);
```

also compare this to customelements v1:

```js
document.body.innerHTML = '<input is="my-input">';
setTimeout(() => {
  customElements.define(
    'my-input',
    class extends HTMLInputElement {},
    { extends: 'input' }
  );
}, 2000);
```

> Others already mentioned screen readers I believe would ignore CSS completely.

that is not true anymore for a lot of modern screen readers. also especially blind webusers are by nature more willing to ugrade their software than your average user (this is backed by my experience from working with companys that specifically create web pages for blind users).


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/509#issuecomment-302350706

Received on Thursday, 18 May 2017 09:25:39 UTC