element-internals-polyfill icon indicating copy to clipboard operation
element-internals-polyfill copied to clipboard

Polyfill doesn't support native popup validation

Open calebdwilliams opened this issue 4 years ago • 5 comments

I'm not really sure the best way to achieve this bit of parity with the native behavior. I've thought about creating a custom element to do this, but that feels kind of gross. I could just use a throwaway DOM node which seems better maybe? Help and ideas definitely welcomed.

calebdwilliams avatar May 01 '21 02:05 calebdwilliams

hmm....Could this work with having the input type="hidden" not be hidden but just 0 height and width? So it is still focusable?

brion-fuller avatar May 03 '21 03:05 brion-fuller

I thought about that, but messing with the user’s focus like that is generally a bad idea and we don’t want to have any elements focusable that wouldn’t be otherwise for completeness and accessibility purposes.

calebdwilliams avatar May 03 '21 12:05 calebdwilliams

I suggest adding examples with possible solutions and/or setup a separate project that consumes this polyfill and provides the functionality. I'm currently working through an implementation and if I find something relevant am inclined to set it up as a sort of contribution or example depending on how it goes. This solves for the uncertainty and ensures the underlying solution's value is maximized. I was thinking it would be easy to dispatch events that elements can handle, but I think it's better (for me) to work through the problem before there's a clearer idea of what is the better solution.

jimmont avatar Oct 11 '21 23:10 jimmont

@jimmont did you ever come up with anything?

calebdwilliams avatar Jan 27 '22 23:01 calebdwilliams

Not beyond an idea, I began the setup some time ago in this fork and had to focus on other work https://jimmont.github.io/element-internals-polyfill/ I was simply planning to figure out the way the polyfill worked and use events ui's could use to implement a related solution. In another project I have an overlay solution for basic overlay ux elements (like native form select, title tooltips, etc) and was going to extend it with this--once I understood how the polyfill worked. Its been so long I can't recall exactly where I was at, may have emailed about it. I can try to take another look.

jimmont avatar Feb 02 '22 01:02 jimmont