Test Keyboard Focus in an Interactive HTML5 Ad
Test keyboard focus in the supported preview of your interactive HTML5 ad. Use Tab and Shift+Tab to move through its controls and back to the page around it. Hold the creative if a control is unreachable, its focus indicator disappears or an interaction stops people from continuing with the keyboard.
By FroggyAds, November 25, 2026
Confirm which interaction the placement allows
Use this test when someone can operate a control inside the ad, such as opening product details or moving through a supported gallery. Check the accepted creative type for the placement and which interaction it can render. Write down the action you expect the person to take and the result that should appear when they do it.
HTML5 display ads can be delivered through different creative workflows. For example, Display & Video 360 documents separate display and rich media options. It directs advertisers with advanced expandable or interstitial creative to Studio. Confirm the requirements of your own campaign before adding controls. Our Display sizes guide describes our published formats and common dimensions.
Ask whether you have a preview of the ad inside its supported frame. In an editor, the creative may open as its own page with nothing around it. An embedded preview lets you check how someone reaches the ad from a previous page control and continues to the next one. If you can inspect only a local creative, record that scope and use it to identify the issues the hosted preview needs to cover.
If you are preparing the Display part of a campaign, create your free FroggyAds account and keep the permitted creative types and planned interactions with the brief. Resolve any placement-specific interaction questions before you send an interactive package for review.
Write down the controls and their order
List the active controls by their visible labels and what they do. A small banner might offer See lamp details as a button that opens a panel, then See desk lamps as a link that leaves the ad. Write the order someone should encounter them from the surrounding page. Include what should be available when the details panel is open and what should disappear from the sequence when it closes.
Compare the visual order with the order you actually reach using Tab. The HTML Standard describes sequential focus navigation and how tabindex affects order. When you can use ordinary HTML buttons and links in the same order as the visible actions, the next control is easier to predict. If a build uses manually ordered tab stops, verify the sequence in both directions and in each relevant state.
Check for stops on items without a visible purpose. A hidden slide or closed panel can leave a control in the Tab order if its visual state and interactive state differ. Write down which item received focus when the indicator disappears or jumps. In a preview that exposes its focus information, the active element can show where focus went. In a hosted preview, an observed gap between two labeled stops can be enough to reproduce the problem with the owner.
If the same painted button seems to take focus twice, compare the keyboard readback with the visible controls. An extra stop can come from two elements offering the same action. Give the owner both positions in the sequence before asking for a change. In a compact ad the duplicate is easy to miss when the visible outline stays in one place.
Move into the ad and back to the page around it
Start from a known control before the ad in a supported preview. Press Tab and note where focus goes. When it reaches the interactive creative, continue through the available items until you reach something after the ad. Do the reverse with Shift+Tab. Keep the entry and exit evidence with the same frame and browser so a reviewer can see what happened at the boundary.
Repeat the route when the ad changes state. Open an available panel, go to the controls that appear and close it using its supported interaction. Check where focus goes after the panel closes, especially if the current control disappears. Then continue forward and backward. A reviewed creative should let people find their place and keep going using the keyboard.
Use the documented behavior if a control needs its own supported navigation keys. The WCAG 2.2 no keyboard trap criterion requires a keyboard way to leave a focused component. If that way differs from familiar exit methods, the person needs to know how to use it. When you find a stop that you cannot leave, note the focused item, player state and keys used and report the defect in the appropriate preview.
If a local version lets you leave and the supported preview holds focus inside its frame, send both observations to the owner. Keep the ad's controls and surrounding page in the readback. The two versions can help identify whether the creative or the embedded presentation needs the change.
Activate each control with the keyboard
Move to the item and pause before pressing its activation key. Verify that receiving focus leaves the person in control of whether to act. Press the key the control supports. Check whether it opens the intended element, changes the selected item or follows the expected link, and whether it does so once. Keep that result with the label the person saw.
Exercise the meaningful state changes. If a button opens details, check that the details become available and the visible label or state still makes sense. If it closes the panel, check that the next focus location is visible and useful. For a link, read back the destination with the authorized testing route. Our ClickTag and exit verification guide covers the destination mapping when the control is an ad exit.
Repeat the relevant checks after you have used earlier controls. A choice in one panel can change the next available action. If a pointer test opens the panel while the keyboard activation has no effect, have the creative owner examine the control and its event behavior. Reopen the revised build and repeat the same keys at the same point in the sequence.
See whether focus stays visible inside the frame
Take a screenshot when a key moves focus to each control you need to test. Keep the whole ad in view, including its edges, overlays and current background. Read the indicator at the intended size. If a border changes color or a ring moves with focus, it should be possible to tell which control will respond to the next key.
The CSS focus-visible selector allows the browser to apply its judgment about when to show a focus cue. Use a keyboard in the actual preview to inspect the state the person will see. Pointer hover can have its own highlight. Starting with a known focus location and taking your hand off the pointer makes it easier to see which highlight follows the keys.
Look at controls near the creative boundary. An outline with a gap takes up space outside the button. A frame or overlying element can hide some of that space. Inspect the same control after the ad changes state, especially if a panel opens over it or its background shifts. A focus indicator should be recognizable where the viewer needs it.
Repeat the visibility check in any bright or dark state your creative uses. An outline can read clearly against a solid first frame and blend into a later image. Capture the moment where the cue becomes hard to see and repeat that view with the revised style.
WCAG 2.2 includes criteria for keyboard operation, visible focus and whether a focused component is fully hidden by author-created content. The minimum obstruction criterion addresses the focused component itself. The measured example below uses an additional buyer requirement that the entire external outline remain in frame. Use the standard's criteria and the agreed creative requirement for the condition each one describes.
Our Display ad design guide covers the wider review of readable message and layout. The keyboard review adds evidence from successive focus states in the same design.
Work through a measured frame-edge example
Suppose a fictional desk lamp ad uses a 300x250 frame and a See lamp details button near its left edge. The button is 104 pixels wide by 34 pixels high. Its custom focus indicator uses a 2-pixel outline and a 3-pixel gap. The review requires the entire outline to remain inside the frame. These are the dimensions and acceptance rule for this example.
At first the button begins 2 pixels from the left edge. The outline reaches 5 pixels beyond the button, so its outer left edge is 3 pixels past the clipping boundary. The left stroke disappears at the midpoint. The other sides can still show part of the outline. We drew the outline at these dimensions in Pillow and counted its visible pixels after cropping to the frame.
Moving the button's left edge to 8 pixels leaves 3 pixels between the frame edge and the outline. The button size, outline thickness and gap stay the same. The local crop retains the entire outline, including the left stroke. The example compares the exact frame and button geometry through one change.
| Local outline test | Original layout | Revised layout |
|---|---|---|
| Frame dimensions | 300x250 px | 300x250 px |
| Button inset from left | 2 px | 8 px |
| Visible outline pixels | 524 of 616 | 616 of 616 |
| Outline pixels clipped by the frame | 92 | 0 |
| Left outline at the button midpoint | 0 px visible | 2 px visible |
| Decision at this stage | Hold for a layout repair | Continue to the keyboard retest |
For the browser retest, the reviewer would reach See lamp details with Tab, inspect the outline, open the details and verify the next focus states in both directions. The raster result measures what fits in the example frame. The supported browser preview supplies evidence about focus order, visibility and activation for the actual creative.
Decide what to hold and what to retest
Give each affected format and size its own outcome. If a control cannot receive focus, record where the sequence skipped it. If focus stays inside the ad, note which control received the last workable input. If it is visible only when a pointer moves into the creative, save the keyboard input and image state where the problem appears.
| What you observe | What to inspect first | Decision |
|---|---|---|
| Tab skips a visible control | Interactive element, state and reachable order | Hold and retest forward and backward |
| Focus reaches the button and its outline is clipped | Frame edge, indicator reach and overlapping layers | Correct the layout or indicator and repeat the same state |
| A focused control does nothing with its supported key | Control semantics and activation behavior | Hold and confirm the intended behavior in the revised preview |
| Navigation cannot move away from an ad control | Internal state and supported route back to the page | Hold and verify a keyboard exit in context |
| The tested controls respond with visible focus and let the person leave | Size, environment and creative version observed | Take that scope into the wider campaign review |
If the chosen placement cannot render the interaction you planned, check whether it accepts a simpler creative with a clear route to the offer. Test the controls and destination of that supported version. If the interaction remains, repeat the affected checks on the production export, including any shared layout that changed with the fix.
Keep the keyboard evidence with the version you submit
Save the final size, creative version, browser or supported preview, sequence of control labels and a capture of each problem you repaired. Include the result of reaching and leaving the creative. Keep a brief record of the activation you performed and what changed. For an issue near the border, attach a close crop and the full frame so the owner can locate the exact state.
Repeat the relevant checks if the creative adds a control, changes its layout or runs in a different interactive frame. A safe inset in one size can disappear in another. Keep the version and placement next to the new observation. Our campaign approval guide describes the wider creative and destination review.
Once you have verified an accepted asset for your FroggyAds campaign, start planning your Display buy with FroggyAds and keep the approval scope with the size and creative you will submit.
Frequently asked questions
What does a passing keyboard focus test show?
In the supported preview, you can reach the intended controls in a sensible order, see the current focus, activate the supported actions and continue out of the ad. The record should identify the version, size and environment where those events were observed so a later review can reproduce them.
How do I tell whether a control actually has focus?
Use a keyboard to move to it and look for the visible state change at normal size. In a preview that exposes the focused element, record its label as well. The focus readback helps locate the active control when the screenshot shows a missing or unclear indicator.
Why does a focus outline disappear at the edge?
The outline and its offset can extend beyond the button's own box. A fixed frame, moving layer or overlay can clip that area. Measure the room the indicator needs and inspect the actual focused state. Retest an approved change to the layout or indication in the same rendered frame.
Which keys should I try around an embedded ad?
Use Tab to move forward and Shift+Tab to move backward where the supported browser uses that sequence. Start from a known item around the ad, move through its controls and continue to an item outside it. Exercise any additional keys the creative documents for its individual controls.
What if a button cannot be activated after I reach it?
Record the visible label, the supported key you used and the state of the ad when it received focus. Ask the creative owner to check the button behavior and the event it receives. Retest in the supported preview after a correction, then verify that keyboard navigation can continue.
Does a local preview prove how the ad frame handles focus?
A local preview gives you evidence about the creative and the context in which you opened it. Inspect the version inside the intended supported frame for the release decision. Keep the two results identified if a difference helps a designer or provider reproduce a problem.
Can a focus ring be different from the browser default?
A supported creative can use a custom cue when the focused control remains recognizable. Test it with the keyboard at the actual size and around the backgrounds it encounters. Check whether the cue stays visible when the state changes and whether the frame can show the area it occupies.
How do I check what happens when a panel closes?
Open the panel through its supported control, move to the relevant item and close it the way a keyboard user would. Record where focus goes next. Confirm that the location is visible and sensible and that another Tab or Shift+Tab lets the person continue in the creative or around it.
Does a clipped outline always fail WCAG 2.4.11?
Apply that criterion to the focused component and the content that obscures it. The minimum criterion addresses a component that is entirely hidden due to author-created content. Check visible focus separately and apply any whole-outline requirement your creative review defines for that placement.
When should I repeat the keyboard focus test?
Repeat it when controls, tab sequence, focus style, layout or the rendering frame changes. Open the exact version you plan to submit and check the states that could be affected. If a change is shared across sizes, include the other eligible sizes that use the changed component.
Sources
- The accessibility criteria cover keyboard operation, keyboard exit, visible focus and focused components obscured by authored content. W3C Web Content Accessibility Guidelines 2.2
- The HTML Standard explains sequential focus navigation and how tabindex changes the order of focusable items. WHATWG HTML focus navigation
- MDN explains the browser judgment behind the focus-visible selector and when the focus cue appears. MDN focus-visible documentation
- Display & Video 360 documents its HTML5 creative types and its Studio workflow for advanced rich media functionality. Display & Video 360 HTML5 creative guidelines