by huhtenberg · 3y ago · 0 comments
This will worsen the UX more often than not. Guaranteed.
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.
Start with the user experience, craft your implementation around that and all will be fine. Including the modal windows.
The article states very clearly the use cases for which modals make sense:
Modal windows can be used for views that don't constitute a "resource" or correspond to a domain entity:
- Alerts
- Confirmation dialogs
- Forms for creating/updating entities
As soon as something is a resource, that is, an article to read, a picture to watch, a diagram to open, a sound to play, in short anything for which it makes sense that it should be reachable via an URI, a modal is the wrong choice.These feel incredibly unrelated to me. Why does that matter at all for the display choice? A modal is getting used because it's a view into another section of the application that doesn't lose the current location of the user.
Further - users (and I mean normal paying users, not HN commentators) rarely ever give a shit about URLs. It's just not important to most people what the string of characters is.
So...
Anywhere you've got multiple steps to complete, or an adjacent resource that might be related and viewed/edited in the context of the parent resource.
Or a form is being filled in and a user wants to enable extras, which requires filling in a different form, etc...
The modal is about not losing the current place for the user. Because most current users don't use multiple tabs/windows for the same product, and they don't pay any attention to the urls.
"Dont open a modal" in cases where the user is likely going to get lost in a detour otherwise is bad advice.
This is not correct. Normal users have learned that if they copy that URL thingie, and send it to someone else, that someone else will see the same thing they see now.
I don't know how many times I've received a link from someone saying "lol look at this hilarious dog" and ended up on some useless overview page completely devoid of hilarious dogs. Because some fucking designer decided to do exactly what TFA is complaining about.
Tell that to my non-techy spouse and her +1400 bookmarks. You know what her most recent rant was about? That she cannot bookmark certain timetables at a booking platform she uses. Why? Because guess what: The timetable shows in a modal.
> The modal is about not losing the current place for the user.
Resources opening in tabs also don't lose the place of the user. But you know what modals do usually lose the user? The ability to interact with anything but the model while it's open. A usual gem is a form which opens a modal, where I would then really really like to copypaste some info I already entered in another part of the form, but can't, because the effing modal is in the way. So I have to close it, and that usually wipes all the info in it.
> "Dont open a modal" in cases where the user is likely going to get lost in a detour otherwise is bad advice.
If a web design can cause the user to get lost in the first place, then the problem isn't that there is no modal, and adding one will likely not fix it.
I've made multiple websites where URLs are routed to modals because the app made most sense as pages on top of an underlying state. GET /things/42/edit loads thing#42 in the background and opens the edit modal prefilled with thing#42's info.
A more obvious example is /login and /register in a modal, a cherry on top if logging in or registering doesn't reset app state if the user decides to register halfway through a task.
Preserving form data during navigation is something you have to consider for any form, even forms on the same page or separate pages where you don't want the form to clear when the user navigates away. One key design principle of modals is to make them mentally cheap to open/close/reopen, and modal state preservation is usually a part of that.
Alerts don't need to stop the world.
Confirmation dialogs block examining the things that you want to confirm.
And forms for creating anything do not need to block access to the rest of the page.
They sure do. Especially modal dialogs. Everybody has been trained to hit okay automatically, because they're so prevalent on things that don't matter. Good apps track history and have undo.
Apps that have changes that matter use more drastic things than modal dialogs. Just try deleting things on AWS.
Such questions as "if I close this modal is that different from using the cancel button?" should not even need to be dealt with by the user.
In fact, you can make a link open modal with left click but open in new tab with middle click. I think it is the most balanced way in my opinion.
Modal and tab can co-exist. They are not really mutually exclusive.
BTW, social media websites generally implements this in their feed view. A image behaves different when you click it with middle or left click.
That's what thumbnails and stubs are for.
> In fact, you can make a link open modal with left click but open in new tab with middle click. I think it is the most balanced way in my opinion.
Cool. How do I "middle click" on my phone? Left click is "open resource" by default. If a webapp doesn't have a damn good reason to overwrite the browsers default behavior, it shouldn't.
And "we thought it would make the design really pop", is not one of those reasons.
Try long press and open in new tab.
Besides, open in modal don't even mean the url won't change. Fb, reddit both open in popup AND change the url. Copy the url to other browser would just work as intended.
It is already a resolved problem in my opinion.
This is yet another instance of optimizing for something that can not be made perfect. Let me decide what I want. Give me the option to do both without much of a hassle. If a decision needs to be made regarding what should happen on a mouse-click, one may choose a sensible default (i.e. what is the most typical use-case), while leaving the option to configure the other choice.
You can always argue that many options are a non-goal, but any sufficiently sophisticated software needs training anyway. Configuration can be a part of that. Nothing is worse than a program in which the designer chose to make your use-case to be painful to be met.
Furthermore, a uri does not need to be bound to a view. In fact, one might prefer different ways to look at the same data.
I know how to close a tab, be it via keyboard shortcut or mouse click. I know how to resize it. I know how to print it. When content I want to glimpse at opens in a modal, I know none of that. Even if it is well designed, different sites will have different engagement paradigms.
My current pet peeve with modals is when I try to select text with the mouse, and drag past the edge of the modal, it closes.
Modal windows and how they interact with the user is obviously something that should be standardized, but that is a different discussion.
[0]: It is even easier to not use a mouse, when you are using an assistant. With a keyboard and VO you can resize, drag and drop and do many more activities.
[1]: https://support.apple.com/en-us/guide/voiceover/mchlp2746/10...
Voice control software is used most often by people with limited use of their hands, verbal commands replace keyboard and cursor control inputs.
> Standard browser controls are all 100% accessible by default.
Unfortunately, this is not entirely true. For instance, `select` elements and their options don't reflow in most browsers. It is true that the native elements are much more accessible than most alternatives developers create.
If 99.99% of your target audience is not using screen readers, then you need to decide if worsening their experience to accommodate the other 0.01% aligns with your project plans and goals.
In some cases it will, in some it won't. It depends.
Second: in physical space: ramps are required to be implemented in a way that supports wheelchair use. Yet they create alternative affordances: I have appreciated them when when I have broken a limb, for example, even though they weren’t “intended” for that. They are clearly mostly used by delivery people; not only does it make deliveries easier, but reduces incidents of injuries, strains etc.
The same applies to web sites: cleaner affordances allow people to use the page in ways not imagined by the designer.
* By imperfectly I don’t mean “not hyper vigilantly”, I mean that it is often observed in the breach; sometimes it can have negative effects (consider the Berkeley videos case), etc. But that is much better than no attempt at all.
Only for governments or businesses that are open to the public. I've rarely worked on those type of websites. But plenty of B2B stuff. There's a ton of it.
It is painful that some managers, architects or developers might think this way. Accessibility is not just for disabled people, such as the blind or those who have lost a limb. In the kitchen, for example, it is great to have push to open drawers (e.g. based on IKEA's EXCEPTIONELL [0]). If your hands are dirty, you can still open the kitchen drawer without getting anything else dirty. And this is just one example of accessibility.
Personally, I see screen readers as an additional tool (like Copilot or ChatGPT) to be used on a daily basis by keyboard users.
Screen readers can also help you, even if you are sighted. For example, with a ShortCat.app [1] I have a system-wide ace jump [2] with a command list. I don't have to use the mouse to move the cursor - I have a keyboard for that. But in applications that are not compatible with screen readers, you can only choose "close", "minimise", "maximise" buttons, and the first option - close - is the best for such an application (e.g. Sublime Text).
In other cases, SR/SA will read the text for you. If you are too tired to read, or your hands are occupied with a sandwich or utensils, you can use SR to read an article or paragraph for you.
[0]: https://www.ikea.com/gb/en/p/exceptionell-drawer-medium-with...
I'm also reminded that people use screen readers or other assistive tech for non-disability reasons. Like increasing font size when tired or when using a website in a foreign language. Plus, building assessible websites may be required by law, such as ADA requirements in the US.
[1] https://ux.stackexchange.com/questions/57340/percentage-of-s...
99.99% of accessibility things are covered if you just follow normal, established software development practices. Unfortunately, a lot of software developers overcomplicate things, for example by adding modal dialogs to websites. Modals are common and established design patterns in desktop apps, but not so in web and mobile apps. Applying one environment's UX patterns to another is asking for trouble.
This isn't quite true, when you get into things like using aria attributes. I definitely wouldn't put it at 99.99%. And I think a lot of vendors of accessibility software get to skate where others would have their feet held to the fire. They could be doing more to make their software easier to use and for developers to make it accessible.
I used to work as a contractor for the CDC, so I have experience in web development that is held to a higher accessibility standard (we had an actual real person who would verify our work and certify that it was accessible.)
Some things that come to mind are color contrast ratios where you have to pass different levels (AA vs. AAA) https://webaim.org/resources/contrastchecker/
And being able to navigate a site with a keyboard, or announce when sections change. That stuff isn't automatic. It might be baked into whatever framework you're using, but those frameworks have bugs too.
Here's an example I ran into with React Native, and it's still not clear if they ever fixed it or if it just got closed as stale: https://github.com/facebook/react-native/issues/27989
And even if you have no empathy so you don't give a shit about anything unless it affects you directly (in which case UI design isn't for you), then consider that unless you die young or have supernaturally perfect health, you're going to need accessibility features yourself some day, so your lazy anti-accessibility attitude is going to come back and bite you in the ass.
And you're dead wrong that accessibility necessarily worsens the experience for people without disabilities. It's useful for everyone.
Please leave the user interface design to other better educated more compassionate people, and stick to the back-end yourself.
If adding support for accessibility delays their product delivery, or raises their costs, it's another tradeoff that might even kill their product. And then it wont be a case of the software not being accessible to those needing those features, but it not being accessible to anybody.
Sure, where the law mandates it, they can always do a half-ass job to be, in name, compliant. But full (or proper) accessibility will be judged in the end like any other feature decision.
You might consider those features essential, but you'd be surprised how many business features get cut to get something out, even more so for an MVP.
If you think those designing most websites and apps people use are made by "more compassionate people" who'd jump on such features out of ethical concerns, you'd be quite off.
Heck, this very website (HN) has a quite bad accessibility track record even considering the average website. Among other things: image elements do not have [alt] attributes, form elements do not have associated labels, links do not have a discernible name.
And this is from a major VC company with tons of resources, and a place where thousands upon thousands of devs frequent.
So, while everybody can get their "morally superior and empathetic" rocks off judging the parent, the reality is more like what's described above. It isn't bad if somebody points to the reality - or to the hypocrisy, if we're to see it ethically.
Put my remarks in the context of a startup that has a limited runway and needs to choose between working on something that would appeal, entice and attract the majority of their target user base and trying to accommodate the needs of the fraction of the same. You can "boo" all you want, but their choice will be obvious, as it should be perfectly understandable, even for people from the second group.
> Please leave the user interface design to other better educated more compassionate people, and stick to the back-end yourself.
Ah, a gratuitous personal attack, the best way to strengthen any argument.
I haven't found a single case where improving accessibility doesn't also result in a meaningful improvement for some set of users who don't need accessible features. There is absolutely no good reason not to make things accessible. Heck, I'd make an app accessible even if I had irrefutable proof that it had no users who need it to be accessible.
Non-bugginess is also accessability, but I don't see a law saying that you can't release unfinished software. So how would accessability be anything more than all the others unimplemented issues stuck in the backlog?
Not any more. In the US this hasn't been the case for years since 2019 [1], and in Europe a similar requirement will take power in 2025 at the latest [2].
There is no choice any more if you cater to either markets: either you're compliant or you can and will get fined to oblivion.
[1] https://www.latimes.com/politics/story/2019-10-07/blind-pers...
[2] https://en.wikipedia.org/wiki/European_Accessibility_Act
SCOTUS rejected hearing the case and has let the 9th circuit decision stand for now. That means the ruling ONLY applies in areas of the US that fall under the 9th circuit. Further, if SCOTUS chooses to hear the case in the future, they may well overturn the 9th circuit decision.
As they point out in that article, this decision would instantly make hundreds of thousands of business non-compliant and open them up to being destroyed by accessibility lawsuits.
A megacorp will just do the work and write off the expenses.
Small businesses are different. Faced with tens of thousands in expenses, they have two options. The first is that they eliminate their website entirely. This hurts them and almost all of their customers (including disabled people who might have relied on the partially accessible features). The second is to lay off employees to pay for the work. Neither option is very good.
E.g. ADA (Americans with disabilities act) website compliance which seems to be required when the employer has more than 15 employees
However, consider how much do you worsen the experience of the majority, and how much do you improve it for the minority? I think that should factor into this decision.
I think the article is mostly trying to make an effort to inform people of the options available to them, so that when you are creating estimates of the work required to support accessibility requirements, you're not overestimating out of sheer ignorance.
Just make a good non-modal view, with whatever transition is needed for continuity to/from the parent view.
As a principle, I don't read any website that has a modal window, especially a modal "subscribe to our newsletter".
It's similarly annoying as paging controls that don't support "open in new window" and/or don't work with the browser history.
- I *want* more details on a separate, linkable URL.
- I *want* it to open in either the same window, or a separate window if I ctrl+click it.
"Subscribe to newsletter" use case is just the worst use case.
The problem that designers are often trying to solve is that there is not enough information that there is a good way to put it on its own page - it's too small for its own page but too large for the table that we'd rather just add another column to.
We have an export button so you can get all the details in excel or LibreOffice or your tool of choice, though. And in a better world, we'd be writing proper desktop apps instead of web applications so that we aren't making stupid compromises like this, but here we are.
Sounds wonderful.
Experience shows that this is not the case, provided you keep load times as lowest as possible.
In business apps, this has the additional advantage of allowing users to share information among themselves by simply sharing URLs.
On large applications, this can be become a nightmare to maintain.
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.
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.
You must use "telemetry" instead of actually talking to your users.
My company requires me to talk to the people who use the web sites I build. (I has a session just yesterday.) They hate modal windows. They even still refer to them as "pop-ups."
There's two words you must learn when talking about UI design - "It Depends".
The one general rule I will state that guides towards using a modal is if the user needs to stay within the context of the originating page and they must return to that page as part of the workflow that launched the modal. But there's also edge cases to this.
source: UXer with 25 years experience in both desktop and webapp.
I have never met that other kind of user.
Even when it's a small detail completely embedded on the context of the page, people get annoyed by modals. AFAIK, that happens on the desktop too (with the single exception of things like app settings).
I do believe in pushing a more usable design despite users not liking it a few times. But those times have to be few, and thus, you have to get a lot of extra usability out of it. Modal details isn't such an important use case, so I do recommend to avoid unless you gather your own evidence (and any UI recommendation can be ignored if you gather your own evidence), even if they are better.
I do recommend a default to avoid almost all of the use-cases people are posting for modals:
- click to enlarge is much better done inline;
- alerts are that one thing where modals became a caricature, modal alerts are absolutely shit;
- confirmation prompts should be avoided as much as you can (yeah, if you can't, make a modal);
- the 2 minutes rule from the OP, nope, if it can't be done inline, you can put it in another page.
It's unrealistic to outline all the different thought processes that would go into such a decisionn in a short comment on HN. And you could not hope to cover all the different things it depends on.
I mean, there are several people in this thread who like modals as users. I’m another one of those. I find modals very useful, as long as you don’t do them in a crappy way. You shouldn’t insult people just because your experience was different.
Now, native browser modals (think Javascript's alert()) don't use the same underlying technology as HTML/CSS modals (think Bootstrap's modal component), but at the end of the day they're both modals/pop-ups.
There are too many to list here. Things that the sort of people who read HN would never imagine.
One is that a surprising number of users don't know to press the "Search" button after they enter text into a search field. They will just sit there for a bit and when nothing happens, they assume it's broken.
I haven't followed up on this yet, but I suspect it's because people have gotten so used to autocomplete.
I never made any blanket assumptions and never wrote "Users hate modal windows."
Reading is fundamental.
I however agree with you, and I don't like the website simply dismissing the idea because it's been over-used and abused all over the place.
Modals have a place in UX.
It is what is wrong with web-designers. They throw away existing browser features, like a scrollbar, and develop their own half-baked replacements, which work differently, they are probably incomplete realisation, and then I'm scratching my head trying to imagine a reason for all this work done by a developer: why to spend additional development time to make my life worse?
It could be a UX improvement, if it was not a modal window but a modeless one: it can help to compare details of different products by placing their windows side-by-side. Or I can right-click on a link and open it in a new window. But a modal window is a nightmare: I can move tabs into a separate browser window easily and to place them side-by-side. It is pain to do it with modal windows. One needs to clone tab and then to open modals.
There's one kind of modality needed for computers, and it's the power switch.
``` history.pushState({}, "", "/new-url"); ```
Moreover, modals serve one very important UI purpose in that they keep the user's mind in a context.
I prefer master-detail views. Like an Email client, where you select a message in a list and then see the body of the email. For smartphone sized screens this should switch to a detail page with a back button. Like the Mail app on iPhone/iPad.
Master-detail can be tough on server side rendered pages though. And you really need a good page structure, because you show a lot of data on one page and it can look cluttered quickly.