Skip to main content
Perceivly: Perceivly home

2.4.12 Focus Not Obscured (Enhanced)

Level AAA · added in WCAG 2.2

When an element receives keyboard focus, no part of it may be hidden by content you added to the page. This level AAA criterion is stricter than 2.4.11, which only forbids hiding the element entirely.

Who it helps

Sighted keyboard users need to see the whole focused element to know what it is and what will happen. Screen magnifier users, who see only part of the screen, are hurt most when focus slips under a sticky bar.

How to meet it

Examples

Fails:Scroll padding smaller than the 80px header, so focused links are half covered
.site-header {
  position: sticky;
  top: 0;
  height: 80px;
}
html {
  scroll-padding-top: 40px;
}
Passes:Scroll padding that clears the header and leaves room for the focus outline
.site-header {
  position: sticky;
  top: 0;
  height: 80px;
}
html {
  scroll-padding-top: 96px;
}
Passes:A sticky footer with matching bottom padding
.cookie-bar {
  position: fixed;
  bottom: 0;
  height: 64px;
}
html {
  scroll-padding-bottom: 80px;
}

Can a scanner detect this?

No

axe-core has no rule for this criterion, because overlap depends on scroll position, screen size and which element is focused. You need to tab forward and backward through each page, at several window sizes, and look for any covered part.

No automated rule tests this criterion. Check it by hand.

Common mistakes

Official W3C explanation of 2.4.12

Check your own page

See which automated WCAG checks your page fails, with the failing elements and how to fix them.

Enter a page address, for example example.com/shop.

Reviewed November 2, 2026