Halloween Sale 15% off Ends in See the plans
CSS

Stronger Keyboard Focus Outlines in wp-admin

Makes the keyboard focus indicator in the WordPress dashboard thicker and higher-contrast on links, buttons, menus and form fields, so it is easy to see where you are.

Don’t have WPIDE yet? Install it on your site

Code

#wpwrap a:focus-visible,
#wpwrap button:focus-visible,
#wpwrap input:focus-visible,
#wpwrap select:focus-visible,
#wpwrap textarea:focus-visible,
#adminmenu a:focus-visible,
#wpadminbar a:focus-visible,
.components-button:focus-visible {
    outline: 3px solid #1d2327 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px #fff, 0 0 0 7px #2271b1 !important;
}

Notes

Uses :focus-visible, so mouse clicks keep the normal look.

How to add this snippet

  1. Install WPIDE on your WordPress site (it is free) and open Code Snippets.
  2. Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
  3. It is added inactive: review the code and settings, then switch it on.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.

Which site should get this snippet?

Enter the address of your WordPress site. WPIDE opens there in a new tab with the snippet ready to review and save.

Remembered in this browser only, so you are asked once.

Report this snippet

Tell the WPIDE team what is wrong: broken code, something harmful, spam or copied work.