Focus Not Obscured is the WCAG 2.2 requirement that a control receiving keyboard focus remain at least partly visible when other page content overlaps it. A sticky header can cover a link when you press Shift+Tab. A fixed action bar can cover the last field in a form even though Tab moves focus to it. In both cases the page may still respond to the keyboard while giving the user no way to see where they are.
What Focus Not Obscured requires
WCAG 2.2 success criterion 2.4.11 (Minimum, Level AA) addresses a focused component completely hidden by content the page creates. Criterion 2.4.12 (Enhanced, Level AAA) addresses partial overlap as well. For a release check, aim to show the whole control and its focus indicator so the label and the current keyboard position are easy to see. See the W3C guidance for Focus Not Obscured (Minimum) and Focus Not Obscured (Enhanced).
Check the focus indicator separately. A button can be unobscured and still have an invisible outline. Conversely, a clearly styled outline can sit behind a banner along with the button. Use the keyboard accessibility testing guide to check focus styling and order across the rest of the page.
Reproduce a sticky header or footer covering focus
- Open the deployed page with a fresh session so first-visit banners can appear. Start at the top and use Tab to move through the main task.
- Tab toward the bottom with the footer or action bar present. Pay particular attention to the last field, inline help links, and validation errors that add controls.
- Use Shift+Tab to return from farther down the page. A sticky header can hide a control when the page scrolls upward to reveal it.
- Repeat at a narrow width, a short viewport, and with browser zoom. A footer with two lines of text at desktop width may take up much more space once its buttons and text wrap.
- If focus seems to disappear, inspect
document.activeElementand take a screenshot before scrolling again. Record the preceding control, key pressed, viewport, and overlay state. That gives another developer an exact path to reproduce the bug.
W3C's sticky header and footer failure examples show why both directions matter. For a header that covers the target reached by a skip link, also test the skip link's scroll position and focus destination.
Fix overlap at the scroll container
For a full-screen app shell that needs persistent actions, give the scrollable region its own row. In this example the header and footer stay in view because only the middle row scrolls. Both bars take up the space they actually need, including when their text wraps.
body {
margin: 0;
}
.checkout-shell {
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;
block-size: 100dvh;
}
.checkout-content {
overflow: auto;
padding: 1rem;
scroll-padding-block: 1rem;
}
@media (max-height: 32rem) {
.checkout-shell {
display: block;
block-size: auto;
}
.checkout-content {
overflow: visible;
}
}
Use .checkout-shell on a wrapper with the header, <main class="checkout-content">, and footer as its three direct children. Adjust the breakpoint using your tallest supported header and footer content. When space runs short, the whole page can scroll and the bars move with it. Check that keyboard users can reach and scroll any region that contains long static content.
If a fixed footer must overlap the page, reserve space in two places. Add ordinary bottom padding to the content so the last control can scroll above the bar. Add scroll-padding-block-end to the element that actually scrolls so the browser has a clear target region when it brings a control into view. Use the footer's rendered height plus room for the focus ring, and update both offsets when the footer wraps or closes. For a top bar, use the corresponding block-start offset. For a document that scrolls in standards mode, apply scroll padding to html. For a nested panel, apply it to that panel. See W3C technique C43 for scroll padding and reserved space.
After either fix, run the same key sequence again. Include the mobile task path, especially when a short landscape viewport or an open panel changes where users can see and scroll.
Add a focused browser regression check
Start with a known keyboard transition. On this checkout fixture, “Review order” in the footer comes immediately after “Delivery instructions” in the Tab order. The test moves backward from the footer and checks that the field's entire box fits inside the scroll panel and above the action bar. The panel and footer have stable data-testid values. The test assumes the desktop shell shown above and a configured Playwright baseURL.
import { expect, test } from "@playwright/test";
test("Shift+Tab reveals the last field above the checkout bar", async ({ page }) => {
const viewport = { width: 1024, height: 640 };
await page.setViewportSize(viewport);
await page.goto("/checkout");
const panel = page.getByTestId("checkout-content");
const bar = page.getByTestId("checkout-actions");
const field = page.getByRole("textbox", { name: "Delivery instructions" });
const review = page.getByRole("button", { name: "Review order" });
await review.focus();
await expect(review).toBeFocused();
await page.keyboard.press("Shift+Tab");
await expect(field).toBeFocused();
await expect.poll(async () => {
const [target, content, footer] = await Promise.all([
field.boundingBox(),
panel.boundingBox(),
bar.boundingBox(),
]);
if (!target || !content || !footer) return false;
const bottom = Math.min(content.y + content.height, footer.y, viewport.height);
return target.y >= Math.max(content.y, 0) &&
target.y + target.height <= bottom;
}).toBe(true);
});
Playwright's bounding boxes report position relative to the viewport. This test checks vertical clearance from a known full-width footer. Review the focus ring visually and add separate cases for side overlays, the forward Tab path, and the short-screen layout. Keep the original failure path in your website regression tests so a footer redesign can trigger the same check.
Review the deployed page with Slop Audit
After the keyboard path passes, run Slop Audit on the public page. If browser measurement completes, review the sampled keyboard focus findings, automated accessibility findings, and large blocking overlay evidence. Retest the original keyboard sequence at the viewport where the bug occurred. After deploying the fix, rescan the same public URL to compare page-level findings. Slop Audit's focus sampling uses a bounded forward Tab sequence and inspects focus styles. The geometry check and manual pass above cover whether your specific header or footer paints over the active control.