Overlays are an aggressive disruptive method of getting users attention. If abused or not implemented properly, visitors may leave the site. Especially on mobile, due to the limited screen size, there are better solutions. As usual it depends on the context and content. Highly recommend that you evaluate the need for a (mobile) overlay on a per-project/per-application basis.
Some applications that could be using overlay (but could be handled with an alternative):
- Web survey
- Can I help you chat function
- Modal dialog message (if content is limited, say just one line of text and 2 buttons, then these are maybe the only exception for using mobile lightbox)
- Image slideshow or video preview
- Content preview (by clicking a ‘?’ or info-button)
- Fixed-position button that scrolls along while the user moves down the page
- Fixed-position button appearing at some point e.g. appears only after if the user has scrolled 1 pagelength down
- Prominent content on the page (e.g. near the navigation header)
- Navigate to new page, expand an accordion, slider/carrousel, swap content. (for lightbox overlays that appear after a user clicks something)
- Modal dialog. Probably using the alert JS function (TBC if it’s feasible to add links and other rich content)
- Other solutions
Some principles (if overlay is the only option):
- The overlay should always be visible in the mobile viewport. It should never be the case that a user scrolls and only sees the overlay background.
- The close button should always be visible. (must-have). This is often in the form of an X in the top-right and/or “Close” button, but can be a floating X or auto-hiding X as done in some Jquery plug-ins.
- Overlay background should be visible so that user knows it’s an overlay that is part of the site.
- Sometimes it needs to be clearly part of the site (e.g. branded or mentioning company/website name the title)
- The overlay should be resized and the content scaled down (see some Jquery plug-ins for overlays/lightboxes)
- It needs to be carefully tested on different devices/browsers. Zooming in and out of the conten should be possible, without hampering the possibility of closing the overlay.
- Content should be limited on mobile. Scrolling can be problematic.
- Generally it is not recommended to show an overlay after x seconds, especially if the user doesn’t expect it and didn’t click anything.
- For regular overlays
- Clicking outside the overlay will close it
- Clicking on the X will close it (as is)
- Pressing Escape key will close it (as is)
- For modal overlays
- Clicking on the Close label, image and/or button will close it
Examples and best practice
A reasonable example is the cookie lightbox of www.Hertz.com on mobile:
– Manage expectations. It seems to appear 1-2 seconds after the homepage is loaded, so the user still knows he’s on the right website and can still act on the cookie request. (dispite that lightbox may not be the best solution for cookie permission)
– Closing. There is a clear, branded “< back” button placed on the top of the overlay, making it quick and easy to close or ignore the message.
– Flexible. It takes up the full real-estate of the screen and if there’s a lot of content this is not a problem, it can be quite tall.
Because of the limited mobile screen size and the uasbility requirements listed here, content needs to be limited and overlays are often not ideal on mobile. Overlays that are limited in content and user-triggered may be an exception. In any case overlays must behave properly, as outlined in the principles above. I recommend to make a list of on what pages overlays are needed and approve the need for a (mobile) overlay on a per-project/per-application basis. If you have little control over this, offer guidelines (in the CMS or another form) to help the client realise the negative consequences of mobile overlays and offer suitable alternatives. Consider limiting the use of mobile overlays for the sake of conversion and the client’s own sake. Provide a overlay solution that can handle any type of (large) content and test it well.