KittyGiraudel / a11y-dialog

A very lightweight and flexible accessible modal dialog script.
https://a11y-dialog.netlify.app
MIT License
2.39k stars 132 forks source link

Consider implementing the 'shown' and 'hidden' events to facilitate animations #649

Closed 5ulo closed 1 week ago

5ulo commented 5 months ago

This is more like feature request. As a BS5 user I'm used to use their events show, shown, hide, hidden which is perfect in some cases. show - fires immediately shown - fires after show animation ends hide - fires immediately hidden - when the hide event ends The last two are a good way to get proper fade-out to work as we can animate on hide and display: none; on hidden.

KittyGiraudel commented 5 months ago

Decent ask. Development has slowed down on the library though, so not sure I’ll get around to it.

KittyGiraudel commented 1 week ago

So I’m thinking about it and I don’t quite know how that would work. a11y-dialog doesn‘t deal with animations at all. I guess it could fire an event at the beginning of the show method (see #696), and one at the end of the show method, but ultimately they’d fire essentially at the same time since the methods are synchronous.

If you have a prototype or more info, I’m happy to consider it but in the current state, I don’t know how this library would implement something like this. Therefore I’ll be closing it. :)