News for hackers. Stuff that matters.
Re:You don't need a modal window by myth2018 on Wednesday May 24, 2023 @08:47AM (#36057252)
You can. But then there are the issues. The article even reports some of them.

On large applications, this can be become a nightmare to maintain.

Re:You don't need a modal window by dimmke on Wednesday May 24, 2023 @09:21AM (#36057638)
I have been developing a single page application for several months in SvelteKit, which emphasizes server side rendering and progressive enhancement. I spent a lot of time making things work without JS when it would have been easier not to.

Modals were the spot where I threw in the towel on perfect progressive enhancement. Like yes, I could make this work without JavaScript. But I'm not willing to take the likely weeks designing and building a robust solution for it which would definitely have to involve routing.

I like OP's post, because this is a decision I am wrestling with. Right now I only use modals for things like confirmation windows or showing a larger version of a photo when you click a thumbnail. Kind of like the use cases they outline. Ephemeral. But I am about to start implementing a payment flow that is more complex than just "enter your card number and hit enter", and as nice as I think it would be to have it in a modal, but having it as its own page/flow is so much easier in so many different ways, I think this tipped me over the edge.

Re:You don't need a modal window by sb8244 on Wednesday May 24, 2023 @09:21AM (#36057637)
What issues? It really seems like subjective experiences being pushed as best practice.

It's absolutely possible to build maintainable, accessible, linkable, fast modals.

I have no clue why someone would say those things are impossible or impossibly difficult to achieve.

Re:You don't need a modal window by myth2018 on Wednesday May 24, 2023 @01:03PM (#36061009)
> What issues?

Article mentions some.

And please notice that we are not advocating for the complete elimination of modals; rather, to avoid their use in specific situations.