polyfillpolyfill / polyfill-service

Automatic polyfill service.
https://polyfill.io/
MIT License
7.53k stars 742 forks source link

Feature request: support for dialog-polyfill? #2768

Open IndependentCreator opened 1 year ago

IndependentCreator commented 1 year ago

What

Add support for https://github.com/GoogleChrome/dialog-polyfill

This would be nice to have to help us start using the <dialog> element with more confidence.

Details

I see that this was requested back in 2017 and at the time the response was

We would need to ensure that the polyfill is filling for a standard feature of the web platform, which we're not sure is the case here.

Has the opinion of the maintainers changed in 2023 now that <dialog> is more widely supported? https://caniuse.com/?search=dialog https://www.scottohara.me/blog/2023/01/26/use-the-dialog-element.html https://webkit.org/blog/12209/introducing-the-dialog-element/

ScottAwesome commented 1 year ago

Biggest issue I could see with this is it isn't a "set it and forgot" thing. You have many limitations when using the Dialog polyfill. For instance, when using the polyfill, you have to register each dialog element with the polyfill, as well as additional limitations

Of course this could be surfaced this to users, however the polyfill also doesn't handle focus management which needs to be explained as well.