Hacker News new | ask | show | jobs
by stephane-klein 1116 days ago
https://youdontneedamodalwindow.dev/
2 comments

You do, due to accessibility in certain contexts. E.g., filling a form should really be a modal (e.g. on a site or in apps catering to the elderly) so that the focus doesn't stray away.

But there are very few situations where you'd need a modal.

In that situation, what is the benefit of a modal versus a full page that only contains the form?
Modals are almost always atrocious experiences for screen reader users though, so not sure if that tradeup is worth it.
No idea how screen readers work for native modals, but on the web I'm not surprised: it's very hard to make a proper modal (with proper focus, keyboard trapping etc.) on the web :(
Don't open the details in a modal window. Have it be a separate page.

And right there you lose the elderly crowd who will never learn how to use tabs and barely understand the back button.