The article seems to pay scant attention to THE main reason modals make sense to me: they allow for a discrete bit of work to be completed within the greater context of the app, without losing state or position.<p>Loading a new page, new tab, or simply navigating fully away to a new editing screen are all pretty heavy disorienting actions for something that could be pretty light.<p>But it's related to the amount of work being done in the modal.<p>For a very small amount of work (e.g. editing a single text field), inline-editing would be best; for a lot of work (e.g. composing a bunch of textboxes and including other data, etc) a dedicated page is best.<p>A modal belongs somewhere in-between - editing a few things at once, in context of other things.<p>"Can this modal be an inline-edit?" <-- first question I'd ask. If the answer is No:<p>"Will the work being done on the modal take more than 2 minutes to do?" <--- then I'd consider a separate page.<p>But things in-between seem perfect for a modal.
> <i>Don't open the details in a modal window. Have it be a separate page.</i><p>This <i>will</i> worsen the UX more often than not. Guaranteed.<p>All complaints on the page are ultimately grievances against poorly thought-through implementations and as such they are rooted in the wrong thing. It's trivial to complement every modal window with a standalone version, in which case it's possible to bookmark them, middle-click on the links and what have you.<p>Start with the user experience, craft your implementation around that and all will be fine. Including the modal windows.
As a UX designer, I wholeheartedly disagree.<p>> Modal windows can't be bookmarked or shared as links<p>Why would the user want to bookmark or share a "modal". I believe the author is confusing a modal with a details page (a customer's details page in a CRM for example) on that we can agree that that kind of content is best shown on a separate page. A modal serves a specific function within a web page, be it a website or a web app. Its main function is to allow the user to perform certain tasks within a page, and those tasks will immediately reflect on the underlying page upon submission (or validation/confirmation ..etc). So I fail to understand why the author thinks a user would want to bookmark that modal.<p>> Modal windows can't be opened in a new tab<p>Nor should they. Modals, as mentioned above, are one layer above an underlying page, and they either show complimentary information related to an element within that page, or they allow to user to performa task. So they should inherently be accessible within the same tab, not a new one.<p>> Modal windows make the Back button confusing<p>Aside from the Close/Abort button inside the modal, a lot of interaction designers and front-end developers are now developing the modals in a way they would close if you press the back button of your browser. No confusion there in my opinion.<p>> Modal windows are hard to get right[...]if you need to support older browsers, good luck.<p>Can't find the date this article was published but I assume it's old because almost all new browsers support at least <dialog> element [1]<p>Modals are a double edged sword, like any UI component or UX pattern really.<p>[1] <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#browser_compatibility" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/HTML/Element/di...</a><p>Further reading: <a href="https://www.nngroup.com/articles/modal-nonmodal-dialog/" rel="nofollow">https://www.nngroup.com/articles/modal-nonmodal-dialog/</a>
I used to feel this way and would make everything linkable, but then I realized that modals are really good at preventing users from getting lost by adding context instead of swapping context.<p>For example, a user may want to edit a few items items in a list Rather than forcing the user to a new page to do each edit, you can pop up a modal and edit in place. With new pages, the user loses the context of the original list. The page swapping is very disruptive.
> Modal windows are hard to get right. The "final boss of accessibility"<p>Lmao, I was making this point at work yesterday. It's really difficult to justify using a modal if you care about accessibility. It's not that it's impossible to do correctly, but even when it's done "correctly" it can still be confusing for users navigating with keyboards / screen readers. So modals are almost always either too much effort to do right, or just not the best approach.<p>Another thing I'd add to this list is that there are some people who browse without JS enabled. I know it's unpopular to care about those folks these days, but it is another reason to avoid modals where possible.
I was thinking this today as I was using JIRA. I would live JIRA to be a boring and more RESTful web app.<p>I hit a bug where if I closed the popup (for a ticket on a board) it just reopened! And some ticket links don’t work. All these bugs and complexity for what?<p>Maybe the browsers should have a built in “open link as popup” for the rare times you want that. And the sites just make it a new page always.
It seems like a lot of people don't really consider what it really means to be "modal," and when it comes up, I describe it something like this:<p>A modal is not, in itself, an overaly, window, frame, etc. Generally, it really shouldn't even be used as a noun. Modal describes the state of the interface. Most interfaces allow for multiple user interactions originating from the broader interface, i.e., it is multi-modal.<p>Sometimes, it is necessary to put the UI into a single-purpose state, so, in a single mode. This is required when two interactions can interfere with one another. When one interaction must not be interrupted by another, we must go modal.<p>The author seems to be chiefly complaining about unnecessary modality and the way that gives rise to clunky UIs that don't allow for things like linking. That's rooted in conflating on-screen, 3D elements like overlay dialog boxes with the concept of one of some interface being modal. An example of this would be an interface with a item list that, on item selection, conjures a modal overlay dialog box with the item details. In the base case, there is no dependency problem here, i.e., it's an entirely acceptable design to allow a user to view the details of two items at the same time, and therefor it doesn't call for a modal detail interface.
This is one of those things that sounds good when presented like this. But it's just the opinion of some guy.<p>Run it through user testing and see how your users actually react to new windows being opened all the time. A lot of them are going to be confused, and not be able to make it back to your site. Modals are popular because they work
We use too many damn modals (2018) (modalzmodalzmodalz.com)<p><a href="https://modalzmodalzmodalz.com/" rel="nofollow">https://modalzmodalzmodalz.com/</a><p>MODALZMODALZMODALZ.COM<p>>We use too many damn modals. Let's just not. Help<p>>The bad news: Modals are the crutch of the inarticulate designer and developer. [...]<p><a href="https://news.ycombinator.com/item?id=23645447" rel="nofollow">https://news.ycombinator.com/item?id=23645447</a><p>>bedatadriven on June 25, 2020 | next [–]<p>>I was just about to share this our designer, who is always talking me down from modals, when I reached the bottom and discovered that our designer is in fact the author.<p>>I seriously can't say enough for this message. Adrian helped us redesign our app 2 years ago, dispatching many many modals in the process, and delivering a huge increase in usability that our customers and users very much do care about.
... for pages!<p>Modals are often fine for dialogs and fleeting interactions that happen within the context of the page you are on. Those often don't need their own URL. Don't need to persist after a page refresh, shouldn't be shared, confusingly pollute browser history and benefit from instant loading.<p>I mostly agree with the author in their examples. If it walks like a page and it talks like a page, it probably should be a page. No need to throw the baby out with the bathwater otherwise.
Modal Windows: If you put up a modal window, and it blocks content beneath it, and I can't at least move it out of the way, then it 100% is anti-user behavior. There is NO good reason for blocking the user from seeing content that might be relevant to the modal window. This is true for both websites and apps.<p>Compare Safari's Open File to Chrome's Open File. Chrome's Open File modal cannot be moved. Safari's can.<p>If you have a modal, and it blocks content, you have to be willing to say "I want to prevent my users from seeing this content while dealing with the modal. The content that is being blocked is not important, and it serves NO purpose."
Preach.<p>You don't even necessarily need to place it in a new page, probably you can just expand it inline.<p>Most modals are just lazy.<p>"Where should I put this piece of UI/information?"<p>"Just place it above everything else."<p>With SPAs you don't even have an excuse that "a full-page reload will take longer" because you can change the whole page/layout instantly.
I think the author's objections can all be addressed by using history.pushState() and treating the modal window like navigation to a subpage/route (in an SPA-style app). This way the modal will have a URL, so it can be bookmarked, can be opened in a new tab (if it's opened through a link) and the back button will work (closing the modal).
The issue is that as web software becomes more and more complex and desktop-esque, it needs features that were common in desktop software. It's a poor user experience to open a new window for lots of things in the browser, but that sort of functionality is still needed sometimes.<p>If I think about the engineering product I work on and where they do have modals, none of them would work with a separate page. It's things like "Load one or more of your saved graphs (which you can search and filter) into this existing page of graphs"
The whole subject of modality in design is a long story but the short story is that we should not mistake the need for ease of implementation with the need for clarity of design. They are orthogonal.<p>There is no question that a design gets easier to parse for users when it is serialized by modality. Likewise, serialization is dramatically easier for implementors since it eliminates the need for concurrent execution.<p>Context matters. Those choices have strong historical reasons for their existence in operating systems and their user interfaces. However, they have little place for being emulated on the web.<p>Why? Because they give rise to all manner of bad implementation such as the fact that linking structures have not grown at the pace they should have, particularly as it relates to documentation.<p>All you have to do is look at Amazon's constant proxy to "click here, click there" as a sad excuse for why HCIs don't scale at the same rate as APIs and you can condemn a large portion of the last two decades of design on the internet since these patterns have been copied ad nauseum but only exist because we've employed tools that automated their creation when a link has always been worth a thousand words of "click here, click there".<p>REST applies to HCIs as much or more than APIs.
I guarantee this was written by somebody who has never worked as a professional UI/UX designer<p>It’s the kind of bold, blanket statement that sounds really great and is a fun opinion to hold, but when confronted with reality crumbles (as many statements of that kind do).
Details pages with a lot of information? Bad fit.<p>Small messages that need to be brought to the user's attention and a simple "OK"/"Cancel" button? Yes, this is a good fit. That's what modal windows were originally created for.
Commenters may wish to note the last section of the article:<p>> Modal windows can be used for views that don't constitute a "resource" or correspond to a domain entity:<p>> Alerts<p>> Confirmation dialogs<p>> Forms for creating/updating entities
I would expand my criticism to elements such as material design drawers and similar ones. Regardless of the support provided by the platform (`<dialog>`, convenient APIs etc), you may still find yourself fighting with the resulting state -- for instance, when the screen must adjust its behavior and/or content according to dialog's content or state. The requirements in such situations can get overwhelming quite quickly.<p>> Because it looked good in the mockup<p>Indeed, tools like Figma can create a dangerous illusion of simplicity. I wonder how much time and effort has been wasted during the actual software development process, despite the initial, marginal savings in mockup design.<p>One must also take in account that the hourly rates for developers are typically higher than those of UI designers, so that it doesn't make much sense to increase productivity of the latter at the expense of the former.
THANK YOU OMG<p>I have lots of frustration with modal views that:
1. block me from seeing the things that I probably need to enter into the view
2. disappear when you accidentally click outside them
3. don't scroll properly
4. don't allow scrolling of the page behind
5. don't play well with reasonable browser extensions (uBlock, but other things as well like Disconnect) or even the tracking prevention build into browsers.
6. store data in a weird place so that a second window of the same site in a different location opens the same (now incorrect) data in the modal.<p>These things are becoming super common in line-of-business apps, where they interrupt workflow. Better options:<p>1. New page, as recommended by this link
2. Expanding a region of interest to allow the form to fit
3. Making the page more interactive in other ways so that a modal doesn't seem like the best way to do the interaction
If your page loads are slower than 200ms, I'd actually suggest having modals. Or at least some way of progressively showing more information (toggles, accordions, etc.) that stay on page.<p>SPA page loads can get really slow, which can frustrate or disorient users. Having too many page loads to sequentially drill down your info architecture can get really annoying for users. If your pages are 1 or 2 layers deep in your architecture, and the rest is shown in some way within the page (again, modals are one way to do it), as a piece of "fleeting information", your users will appreciate it.
Yes I do. Not every software is cathedral built on a green field with unlimited budget. Sometimes you just need to smack an alert() or confirm() or prompt() in the middle of code and move on to more important stuff.
Modal Windows absolutely can be shared with a link if done well.
Open the modal as an overlay and set the url with javascript.
Then also have a noscript tag which contains a link to that (modal) page. On the server side you just need to make sure that you can render that page and serve it.
This is pretty much how imo. modern SSR frameworks like sveltekit are intended to be used.
Of course if non-js users aren't a concern, you can do this with an SPA too, the client side routing just needs to be programmed right and the server needs to serve the bundle correctly.
I disagree. Modal windows are great if the information is small enough that it can be digested in a single glance. Making me open up a new tab to view a paragraph of text is just plain annoying.
Counterpoint: This is a little like arguing that you should use GOTO instead of call stacks. Like a function call, with a modal you keep your place and know you will be able return to where you were. No risk of getting lost.<p>Linking to a separate page is like GOTO control flow. You leave it up to the user to figure out where to go from there, but the user usually doesn’t know the full sequence of steps that are part of a task. It’s your responsibility to guide them.
1. you can certainly implement good user interface accessibility in both page-based websites and single-page applications, the latter requiring time, knowledge, and proper prioritization within the project<p>2. once again, there is a failure here to recognize which use cases are best served by a website (i.e., a set of web pages that use native browser navigation) or by a single-page application (which takes native UI paradigms such as multiple windows and modals and implements them using web technologies)<p>3. blanket criticism for single-page applications often comes from people who have no real understanding of web development and harbor nostalgia for the "good old days" when browsers acted only as display devices for server-generated HTML strings; those people aren't worth arguing with, I don't have time for them, I'd rather spend my time improving web technologies so that more people can implement applications that feel "native" yet work across different architectures, devices, screen sizes, languages, and writing directions, built on top of a platform that is privacy-centric by default, and not controlled by a single company
I mostly agree with this. I've been refactoring some "modals" that have 30+ fields. Ultimately, I prefer the idea of subdividing a gigantic web app resource into smaller pieces whenever it isn't entirely catastrophic for the UX. For example:<p><pre><code> /MyResource/123 (all operations happen here as various "Modes")
vs
/MyResource/123/View
/MyResource/123/Export
/MyResource/123/EditPropertyA
/MyResource/123/EditPropertyB
/MyResource/123/Delete
etc...
</code></pre>
This doesn't work for all things, but I mostly build internal admin dashboards when I am doing web development.<p>One other benefit to using full routable pages for your various views is that you can subdivide the work a lot more easily. Assuming you have some common layout/style system (which you absolutely should), you can realistically part out the dev work at the grain of a URL at a time. We still have a few modals, but they are all of the "confirm scary operation XYZ" variety.
> Modal windows can't be bookmarked or shared as links.<p>Modals can definitely be bookmarkable if they are dependent on a certain path or query param to appear.
Last paragraph says this:<p>> Modal windows can be used for views that don't constitute a "resource" or correspond to a domain entity:
> [...]
> Forms for creating/updating entities<p>Wow, in my opinion this a perfect example where a separate page IS still superior to a modal: how much better a "create issue" jira PAGE is vs the modal?
Ironic that the popover API was just announced 2 days ago. <a href="https://developer.chrome.com/en/blog/introducing-popover-api/" rel="nofollow">https://developer.chrome.com/en/blog/introducing-popover-api...</a>
> Modal windows can't be bookmarked or shared as links<p>We use modal windows specifically for this reason (for our payment application's checkout page).<p>Also using a modal significantly improves the checkout experience in case of SDK flows for payment methods like Klarna, Google pay etc.<p>Personally I feel modal windows are better aligned to the user's flow of attention. We also have redirection flows for these payment methods to open the authentication page in a new tab but we pick the modal flow ever single time for a better experience.<p>You can get a feel of what I'm talking about over here: <a href="https://demo-hyperswitch.netlify.app/checkout" rel="nofollow">https://demo-hyperswitch.netlify.app/checkout</a>
"To compensate for slow page load" is probably my main use (still rare), and, hey, sometimes you've got slow page load.<p>Another reason might be to avoid losing state on the underlying page.<p>If you have a "SPA" style app, it might obviate both of these reasons. In an SPA app (ideally one with good URL and back button behavior of course) the difference between a modal window and a separate page perhaps becomes _only_ one of UX, which presentation is better?<p>But in a more traditional server-side-rendered app with minimal UI-focused JS, other considerations still exist which are legitimate, it seems to me.
I think whether to use modal window or not should be case-by-case basis.
I once refactored a web application for a data analysis platform using a front-end framework that I developed myself, and many of the prompts and information display functions in this framework are implemented through modal windows.
When we showed the system to customer, we still gained a little acceptance.
Of course, this internal private system doesn't need to do SEO optimization and indexed by search engines, if there is such a demand, using modal windows may not be the best way.
Phoenix LiveView handles all of those concerns extremely well and pretty much for free. All of my modals are tied to a live action in a given live view. You can bookmark them, use the browser back button to close them and the state "under the modal" is a complete non-issue. It's just loaded as part of the live view and a modal is shown only on specific actions.<p>That may sound like gibberish if you're not familiar with Phoenix LiveView, but it all makes sense and it just works.
I like the azure portal solution, where everything opens in a modal, in the form of a panel. When the link is followed, the panel opens as the main window.
Disagree, you can put the info in whatever box you want.<p>Just make it so that you can copy-paste the URL and you will see the same page with the same modal openen.
> Modal windows can't be bookmarked or shared as links. Deep linking can be added to modals, but it's complex. What will show up in the background when the link is followed? How much application state needs to be restored? How will the user be confident that it will work?<p>Why is there a completely untested assumption that everything should be linkable?
> You don't need a modal window<p>You don't need most of the cruft that clutters "modern" webpages. While not solely responsible, ever more "clever design" has certainly contributed to the status quo, where we load upwards 30MB of garbage to display <10 lines of information.
Like with a lot of things, modals get overused then people get sick of seeing modals everywhere and go anti-modal. Bootstrap probably helped contribute to that.<p>Modals have their use and function. Don't overdo it and maybe even provide non-modal options in addition to the modal.
I hate separate pages because I lose all the context in the background. More often that not, I find myself needing info from the main page and often have to go back to it. Same thing happens on modals that you can't grab the title bar and drag it around.
I hate them, but our UX designers use them everywhere. I try to fight back, but their "usability studies" always comeback in favour of modals.<p>I really don't get it. We're doing mostly SPAs, so any back-button would be as fast as closing the modal.
I'd even argue <i>all</i> html modals are bad designs; including alerts, forms, and confirmations. HTML modals are poor emulations of native dialog boxes; they try to address rendering performance problems that no longer exist.
While I agree with the author, I can’t actually think of an example where a modal is being misused in this context? Every application I’ve worked on with a ‘resource detail’ component had a open in new tab hyperlink.
> Forms for creating/updating entities<p>Sprinting along delightfully, getting everything right, every piston firing... then falls on face at the last hurdle.<p>No, don't put forms in modals, gah!
Most of this post is trying to declare rules that just aren't true. Even Asana will deep link a modal, it's just another piece of state in the url