Whole page
Pop-up content on focus does not close with Escape
WCAG 2.2 success criterion 1.4.13 Content on Hover or Focus (Level AA)
- WCAG 2.2
- 1.4.13 Content on Hover or Focus
- Level
- AA
- Default severity
- Needs review
- Available in
- Free
Updated for Lumtera 1.2.2 and Lumtera Pro 1.1.1.
Why does it matter?
Submenus and tooltips that appear on focus can cover what people are trying to read, especially when they zoom in. Keyboard users need a way to close them without moving on, and Escape is the key they expect.
Who it affects: Keyboard, screen reader and low-vision users — every visitor meets the page title, language, landmarks, keyboard focus, target sizes and zoom settings on every page.
What does Lumtera flag?
Found by the keyboard walk (review mode's Keyboard tab, "Check keyboard access"). When focusing an element shows new content (a submenu, a tooltip, or something it points to with aria-controls or aria-describedby), Lumtera presses Escape with a script. If the content stays open while focus stays put, it is listed for review, up to five per page. Content that covers nothing, or reports an input error, is exempt, so a person confirms.
Check ID page-focus-dismiss, as shown in review mode and saved results.
How do I fix it in WordPress?
Let Escape hide content that appears on focus, without moving focus: for example a keydown handler that closes the open submenu or tooltip. If the theme or menu plugin shows it, check its settings or ask its author. Content that does not cover anything else is exempt.
Example
.menu-item:focus-within > .sub-menu { display: block; } /* nothing closes it */
document.addEventListener( "keydown", ( e ) => {
if ( e.key === "Escape" ) closeOpenSubmenu(); // focus stays where it is
} );
How do I check the fix?
- Reload the page in review mode and run the Keyboard tab again (or Test menus and pop-ups for menus, dialogs and tabs). The finding disappears once the page passes.
- Load the page and press Tab: a "Skip to content" link should appear first, and you should always see where focus is, even under a sticky header. Pinch-zoom on a phone, and check the browser tab shows a meaningful title.
Check your pages with Lumtera
This check is free. Open any post, choose Accessibility in the admin bar, then the Keyboard tab: Lumtera numbers every Tab stop and checks the page with the keyboard, theme, menus and footer included, one page at a time. Lumtera Pro's Page checks screen (Lumtera → Checks → Page checks) runs the same keyboard walk on every page you select, at desktop width and, with "Also check at phone width", again at 390 pixels, and saves the results with the page; scheduled checks have no browser, so they do not run it.
Related checks
-
WCAG 2.4.2 · AError
Page title is missing or generic
-
WCAG 3.1.1 · AError
Page language is missing or not valid
-
WCAG 1.3.1 · ANeeds review
Page headings are missing an H1 or skip levels
-
WCAG 1.3.1 · ANeeds review
Page landmarks are missing or share a name
-
WCAG 2.4.1 · ANeeds review
No working way to skip to the main content
-
WCAG 1.4.4 · AAError
Zooming is disabled
Start with the free plugin today
All 69 content checks and 33 whole-page checks, fixes you approve with undo, and the site report — free, with no account and no page limits.