Skip to main content

🎉 Lumtera Pro Introductory Offer — 50% OFF! ✨ Go Pro for half the price. Limited time! 🚀

Offer ends in 0d 00h 00m

Get Lumtera Pro

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

Flagged on the rendered page
.menu-item:focus-within > .sub-menu { display: block; } /* nothing closes it */
Fixed
document.addEventListener( "keydown", ( e ) => {
  if ( e.key === "Escape" ) closeOpenSubmenu(); // focus stays where it is
} );

How do I check the fix?

  1. 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.
  2. 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.

All checks

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.