HTML5 game publishing
How Pop-Ups, Autoplay Videos and Notifications Affect Website Visitors
How interruptions affect visitors, what WCAG and ad standards say, how to ask for notifications properly, and an annoying versus user-friendly page with working code.
A visitor opens your article. Within two seconds a video starts talking, a dialog asks for their email, a browser prompt asks to send notifications and a cookie banner covers the bottom of the screen. They have not read a word yet. Most will close the tab, and the ones who stay will remember the site as an annoyance.
This guide looks at how pop-ups, autoplay media, permission prompts and notifications affect visitors, what accessibility standards say, which alternatives respect the reader, and how to avoid pressuring people. It includes a comparison of the same page designed badly and well, with working code.
What each interruption does to a visitor
| Interruption | Effect on the visitor | Who is hurt most |
|---|---|---|
| Pop-up or modal on page load | Blocks the content, breaks the reader's first impression, requires finding the close button | Mobile users with small screens, keyboard and screen reader users if the dialog is not built properly |
| Autoplay video with sound | Startles, competes with other audio, wastes data; many people are in public or at work | Screen reader users (audio clashes with speech), people with attention or sensory sensitivities |
| Autoplay silent video or animation | Draws attention away from the text; large motion can be uncomfortable | People with vestibular disorders or attention difficulties |
| Notification permission request on arrival | Asks for a commitment before the visitor knows what they would receive | Everyone; prompts are often dismissed or blocked |
| Sticky bars and floating widgets | Cover content, especially on mobile | Mobile and zoomed-in users |
| Ads that load late and shift the layout | The reader loses their place or taps the wrong thing | Everyone, especially on slow connections |
| Exit-intent offers | Interrupts the decision to leave, and feels like a trap | Visitors who already decided |
What the standards say
- Audio control (WCAG 1.4.2, level A): if audio plays automatically for more than 3 seconds, the page must offer a way to pause or stop it, or a volume control that is separate from the system volume. Muting the system volume does not count.
- Pause, Stop, Hide (WCAG 2.2.2, level A): moving, blinking or scrolling content that starts automatically, lasts longer than five seconds and appears alongside other content must be pausable, stoppable or hideable. Auto-updating content has the same requirement.
- Dialogs must work with a keyboard: a modal needs focus moved into it, a visible close control, the Escape key, and focus returned afterwards. The WAI-ARIA dialog pattern covers this, and the native HTML
<dialog>element does much of it for you. - Better Ads Standards: the Coalition for Better Ads identifies experiences consumers find disruptive, including pop-ups, autoplay video ads with sound and some full-screen interstitials, and says sites should avoid them. Search engines have also stated that intrusive interstitials that hide content on mobile can hurt how a page ranks.
Sources are listed at the end. None of these standards bans a pop-up outright. They set limits so that people can control, dismiss and get past them.
Permission prompts and notifications
Browsers show their own permission dialog when a site requests notifications. Because it blocks the page and cannot be restyled, asking the moment a visitor arrives wastes the one chance you have, since a refused request is hard to reverse.
- Ask only after the visitor has shown interest: finished an article, played a game twice, or clicked a "Notify me" button.
- Explain what they will get ("one message a week when new puzzle games arrive") and how to stop.
- Trigger the browser prompt from a click on your own button, not on page load.
- Respect a "no". Do not ask again on every page.
- Send fewer messages than you think you should. Unsubscribes and blocks follow every spammy notification.
Alternatives that respect reading
| Instead of | Try |
|---|---|
| Email pop-up on arrival | An inline signup block at the end of an article, or a small non-blocking banner after the visitor has scrolled well into the page |
| Autoplay video with sound | A poster image with a clear play button; if you must autoplay, keep it muted, short, and give pause controls |
| Notification prompt on load | A "Get alerts" button the visitor chooses to click |
| Full-screen interstitial between pages | A slim banner at the top or bottom that can be closed |
| Exit-intent modal | A single line of recommended reading at the end of the page |
| Floating chat widget covering content | A small icon that does not obscure text and starts closed |
| Cookie banner covering half the screen | A compact bar with equal "Accept" and "Decline" choices |
The same page, two designs
| Moment | Annoying version | User-friendly version |
|---|---|---|
| 0 seconds | Hero video autoplays with sound | Static image, clear heading, text visible immediately |
| 2 seconds | Browser notification prompt | Nothing |
| 5 seconds | Full-screen email modal | Nothing |
| While reading | Sticky ad and chat bubble cover the text; ads push content down as they load | Reserved ad space, ads between sections, no sticky elements over text |
| Midway through the page | Second pop-up: "Wait! Don't miss out" | A small, closable banner offering a weekly newsletter, shown once |
| On leaving | Exit-intent offer | Related reading at the end |
| Close controls | Tiny grey X, low contrast | Large, labelled button, Escape works |
Annoying version (do not copy)
<video src="promo.mp4" autoplay loop></video>
<script>
window.addEventListener('load', () => {
Notification.requestPermission();
document.getElementById('modal').style.display = 'block';
});
document.addEventListener('mouseleave', () => showExitOffer());
</script>
User-friendly version
<!-- Video waits for a click, with controls -->
<video src="promo.mp4" poster="promo.jpg" controls preload="none"></video>
<!-- A non-blocking prompt, shown once, after the reader has scrolled -->
<aside id="signup" role="region" aria-label="Newsletter" hidden>
<p>Get one email a week when new games arrive.</p>
<a href="/newsletter">Sign up</a>
<button type="button" id="signup-close" aria-label="Close newsletter prompt">Close</button>
</aside>
<!-- Notifications only when the visitor asks -->
<button type="button" id="notify">Get game alerts</button>
<script>
const signup = document.getElementById('signup');
const KEY = 'signup-dismissed';
const seen = () => { try { return localStorage.getItem(KEY) === '1'; } catch { return false; } };
window.addEventListener('scroll', function onScroll() {
const scrolled = window.scrollY / (document.body.scrollHeight - innerHeight);
if (scrolled > 0.6 && !seen()) {
signup.hidden = false;
window.removeEventListener('scroll', onScroll);
}
}, { passive: true });
document.getElementById('signup-close').addEventListener('click', () => {
signup.hidden = true;
try { localStorage.setItem(KEY, '1'); } catch {}
});
document.getElementById('notify').addEventListener('click', async () => {
if (!('Notification' in window)) return;
const result = await Notification.requestPermission(); // only after a click
console.log('Notification permission:', result);
});
</script>
Style the prompt as a small bar anchored to the bottom, with a fixed height that does not cover the main text on a phone, and test it on a narrow screen.
Avoiding coercive patterns
- Make "No thanks" as visible as "Yes", with neutral wording.
- Do not disguise ads as close buttons or navigation.
- Do not block content until someone subscribes or turns off an ad blocker without telling them why and offering another way in.
- Do not reset a dismissed prompt on every page view.
- Do not use fake countdowns or invented scarcity.
- Test with real people on real phones. Ask someone who has never seen the site to read an article and tell you when they felt interrupted.
Checklist
- Nothing blocks the content in the first few seconds.
- No audio starts without a click, and any media has controls.
- Moving content is pausable after five seconds.
- Notification requests happen after a click on an explained button.
- Prompts are shown once, can be dismissed with mouse, keyboard and screen reader, and stay dismissed.
- Ads have reserved space and sit between sections.
- The cookie choice is compact and gives equal prominence to accept and decline.
- The page was tested on a small phone.
Sources
- W3C: WCAG 1.4.2 Audio Control and 2.2.2 Pause, Stop, Hide.
- Coalition for Better Ads: Better Ads Standards.
Related: making your website comfortable for long reading and designing a child-friendly gaming website.


