Re: [w3c/webcomponents] Need callback for form submit data (#187)

I just wanted to add some discombobulated thoughts as somebody who's been living the "submitting custom elements in forms" story for the last 2 years:
- users really expect custom elements to work like `input`, and they do not understand or care why they are different. If a custom element can't be validated (but the native elements can), it will matter less, imo that it can be submitted to a form. If you have to override the form submission so that you can manually trigger custom element validation because the `<form>` doesn't do it, you could at that point just create your `<input type=hidden>` and submit everything anyway. I think validation is a key aspect of successfully submitting form data. 
- we've had to implement a `label` that works with custom elements, because having the native `<label>` not work with custom elements was a very bad story, and led to elements with dubious accessibility. It's a hard/annoying element to write correctly, because you have to forward both clicks and `aria` attributes manually
- not all custom elements can have a shadow root, so I think requiring a shadow root to be eligible for form submission is bad. The example here is any custom element that needs to wrap/interact with an older API that was written before shadow DOM was a thing, and does global `querySelector`s (see: ACE editor, jQuery plugins, etc)

-- 
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/187#issuecomment-370543351

Received on Monday, 5 March 2018 19:57:21 UTC