Accessibility
Modals that everyone can use.
Popups are where keyboard and screen reader users most often get stuck. Modal Kit builds on the browser’s own dialog, moves focus where it should go and gives it back, and respects reduced motion. None of it needs setting up, and none of it can be switched off by accident.
Heading
Where focus lands first
Screen readers start at the top of the modal, and keyboard users are already inside it.
44px
Close and form targets
The close button, pause button and Pro form fields are at least 44 pixels tall.
Esc
Closes it, then focus returns
Back to the link or button that opened it.
4.5:1
Contrast in fixed styles
Every text and button colour pair, checked by unit tests.
Built in · Free
What every modal does
These come with the free plugin, in every layout and style.
The browser’s own dialog
Modals are native <dialog> elements. Overlay layouts open with showModal(), so the browser keeps focus inside and makes the page behind inert: nothing behind can be clicked, tabbed to or read out.
Focus moves to the heading
When a modal opens, focus lands on its heading, so a screen reader starts with what the modal is about. You can choose the first field, first button or close button instead.
Focus comes back
Closing a modal returns focus to the link or button that opened it, so keyboard users carry on where they were.
Esc and a click outside
Esc closes the modal and so does a click on the backdrop. Either can be turned off for a modal that needs a decision, and the close button is always there.
A name screen readers announce
Each dialog is labelled by its first heading by default, or by its title or your own words. The × button is labelled “Close” in the visitor’s language, or with your own label.
Bars and corners don’t interrupt
A bar, corner or inline modal that opens on its own leaves focus where it was, and the page stays usable. Opened from a link, it takes focus like any other modal.
44-pixel targets and visible focus
The close and pause buttons are at least 44 by 44 pixels. They, and the video play button, show a clear outline when focused with the keyboard.
Reduced motion means a fade
When the visitor’s device asks for reduced motion, slides and rises become a short fade, or no animation at all if you prefer.
Links work without JavaScript
A #modal link still shows the modal’s content as a panel in the page when scripts are blocked or haven’t loaded.
No surprise timers
Closing on a timer is off for the whole site until you allow it. When a modal uses it, visitors get a pause button (WCAG 2.2.1).
Video that stops when you leave
A video pauses when its modal closes, and doesn’t autoplay for visitors who prefer reduced motion. Its click-to-load screen has a labelled play button.
Scroll lock for overlays
Overlay layouts stop the page behind from scrolling while they’re open, and let it go when they close.
Settings · Free
Defaults for the site, changes per modal
Settings → Accessibility sets the defaults for every modal. Any modal can change them in its sidebar, and modals that do are marked with a dot, so nothing drifts unnoticed.
Setting
Choices
Default
Accessible name
The modal’s first heading or its title, and per modal also your own text.
Heading
Focus when opened
The heading, the first button or the close button, and per modal also the first field.
Heading
Close button label
Your own words, read aloud for the × button.
“Close”
Page behind
Lock scrolling for layouts with an overlay, and make the page inert while open.
Both on
Reduced motion
A simple fade, or no animation at all.
Fade
Auto-close
Allow modals to close on a timer (3 to 600 seconds per modal), always with a pause button.
Not allowed
Esc and click outside
Per modal, under its close options.
Both close
Pro
Forms, games and steps, built the same way
Pro’s interactive blocks follow the same rules: real buttons and labels, announcements for what changes, focus that lands somewhere useful, and no motion for visitors who ask for none.
Forms
Every field has a real label, and required ones are marked as required. An error is tied to its field, which is marked invalid and gets focus. Send failures show in an alert, and the thank-you message takes focus when it appears. Enter submits.
Multi-step modals
Moving to a step announces “Step 2 of 3” with the step’s name and moves focus to its heading.
Games
Each game starts from a real button: Spin the wheel, Reveal or Open gift. The result is announced and takes focus, so nobody has to watch the animation. With reduced motion, the result shows straight away.
Scratch card
Drag to scratch, or press Reveal. The foil is decoration that screen readers skip.
Carousel
Named as a carousel with labelled slides, previous and next buttons, and dots that mark the current slide. Arrow keys move between slides. Autoplay has a pause button and never runs with reduced motion.
Teaser
The small tab that reopens a closed modal gets focus back when the modal closes again. On phones its edge tab is a 44-pixel target.
Age gate
Date fields that continue on Enter, invalid parts marked and focused, and messages read out as they appear.
Motion and countdowns
Entrances, text animation and parallax all stop for reduced motion. Countdowns are marked as timers, so screen readers read the time when visitors reach it instead of every second.
Testing
Checked in a real browser on every change
Modal Kit’s end-to-end suite drives Chromium with Playwright on a WordPress site. These are some of the checks it runs, in its own words.
A link opens the modal, focuses its heading, Esc closes and focus returns
The page behind is inert while an overlay is open
Esc and click outside can be turned off
Corner and bar leave the page usable and don’t take focus
Without JavaScript, the link shows the modal as an in-page panel
Forms: an invalid email is marked and focused, the thank-you message is focused
Steps: focus moves to the next step’s heading, which is announced
Games: a play shows and announces the prize, and focus moves to it
Games: reduced motion shows the result straight away
Carousel: keyboard arrows, and no autoplay with reduced motion
Motion: with reduced motion, everything appears at once
Teaser: gets focus back, and has a 44px target on phones
Contrast, tested in numbers
The three fixed styles, Fieldnote, Harbor and Night, have unit tests that check every text and button colour pair reaches at least 4.5:1, the WCAG AA level for normal text.
Pick a custom accent, or your theme’s primary colour, and the editor warns when its text or links drop below 4.5:1.
Your part
What a plugin can’t do for you
Modal Kit handles the dialog. What goes inside it is yours, and so is how it looks in your theme.
Headings and words
Start each modal with a heading that says what it’s for: it’s what focus lands on and what the dialog is named after. Write link and button text that makes sense on its own.
Images and video
Add alt text to images in your modals, and captions or a transcript to videos you host.
Your theme’s colours and buttons
Native, Soft and Editorial use your theme’s colours, fonts and button styles, so their contrast and button sizes come from your theme. Check them, or pick one of the fixed styles.
Custom colours
Colours you set on blocks inside a modal override the style. The editor warns about a low-contrast accent, but not about every colour you choose.
Timing and frequency
Think about how often a modal opens on its own and when. A modal that opens mid-task is a barrier even when it’s accessible.
Choices you make for visitors
Turning off Esc and click outside, or using an age gate that can’t be dismissed, are your decisions. Keep them for modals that genuinely need an answer.