Sub topic 10
Pop-ups on mobile and search guidelines
This chapter assumes you can build the dialog-based pop-up from earlier chapters and read a short CSS media query. Pop-ups that work on a desktop monitor often fail on a phone, and Google can lower the ranking of pages whose pop-ups block content for mobile visitors.
Why mobile changes the rules
A phone screen is small, so a modal that fills 30% of a desktop window can cover the whole page on mobile. Three problems are common:
- The close button is too small to tap, so visitors leave the page instead.
- The on-screen keyboard covers the form field and the submit button.
- Scroll-based triggers fire at odd moments, because mobile browsers resize the viewport as the address bar hides.
What Google's guidance says
Google's guidance on intrusive interstitials says that pages may rank lower in mobile search results if the content is not easily accessible when a visitor arrives from search. These patterns are the usual targets:
- A pop-up that covers the main content right after the visitor clicks a search result.
- A standalone interstitial the visitor must dismiss before reading anything.
- A layout where the top of the page looks like an interstitial, with the real content pushed below the fold.
Google lists exceptions. Legally required notices, such as cookie consent or age verification, are fine. So are login dialogs for private content. Banners that use a reasonable amount of screen space and are easy to dismiss are also fine.
Choosing a safer format on mobile
For small screens, replace the full-screen modal with a format that leaves the content readable.
| Format | Mobile risk | Suggestion |
|---|---|---|
| Centered modal | High. It covers the content. | Skip it on small screens, or delay it until the visitor has engaged. |
| Bottom slide-in or sticky bar | Low, if it stays small. | Keep it to a few lines tall. |
| Inline form | Lowest | Place it after a relevant section. |
Switching formats in code
This example reuses the #signup-dialog from the earlier chapter. It shows a bottom bar on narrow screens and the modal on wider ones. The bar has a close button with a large tap target.
<div id="signup-bar" hidden>
<form action="https://example.com/subscribe" method="post">
<label for="bar-email">Email address</label>
<input type="email" id="bar-email" name="email" autocomplete="email" required>
<button type="submit">Subscribe</button>
</form>
<button type="button" id="bar-close" aria-label="Close sign-up bar">×</button>
</div>
<style>
#signup-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 8px; background: #fff; border-top: 1px solid #ccc; }
#signup-bar input, #signup-bar button { min-height: 44px; font-size: 16px; }
</style>const bar = document.querySelector('#signup-bar');
const dialog = document.querySelector('#signup-dialog');
function showPrompt() {
if (window.matchMedia('(max-width: 767px)').matches) {
bar.hidden = false;
} else {
dialog.showModal();
}
}
document.querySelector('#bar-close').addEventListener('click', () => {
bar.hidden = true;
localStorage.setItem('signupDismissedAt', String(Date.now()));
});Call showPrompt() from your scroll trigger instead of calling dialog.showModal() directly. The 16px font size stops iOS Safari from zooming in when the field gets focus. The 44px minimum height gives fingers a comfortable target.
Common errors
- Showing a modal on page load to visitors who came from search. This is the exact pattern Google describes.
- Testing only in a desktop browser with a resized window. Test on a real phone, with the keyboard open.
- A close button smaller than about 24 CSS pixels. WCAG 2.2 sets 24 by 24 pixels as the minimum target size, and 44 by 44 is the common recommendation.
- Hiding the close button until a timer ends.
- Forgetting the frequency cap, so the bar returns on every page view.
Exercise
A visitor taps a search result on their phone, and your page immediately covers the article with a full-screen newsletter modal. Name the problem and give two changes that fix it.
Show answer
This is an intrusive interstitial, because it blocks the main content right after arrival from search and can lower mobile rankings. Fixes: replace the modal with a small bottom bar or an inline form, and delay any prompt until the visitor has scrolled or engaged. A third fix is to make sure the close control is large and always visible.