Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Add Skip Links to WordPress for Accessibility

Learn the correct classic-theme and block-theme methods for adding a WordPress skip link, including matching IDs, focus behavior, CSS, testing, and fixes.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable WordPress pattern is a keyboard-focusable link placed before the header and navigation that points to the page’s primary <main> landmark. For a classic theme, add the link near the start of <body>, give the main element a matching id, and reveal the link when it receives focus. For a block theme, assign the primary content wrapper the main HTML element in the Site Editor; WordPress can generate the Skip to Content link for you.

A complete implementation must do four things: appear first in the document’s tab order, become visibly identifiable on focus, use a fragment that matches the main-content target exactly, and leave keyboard focus in the main area after activation.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a skip link is and why WordPress needs one

A skip link is a short link at the beginning of a page that lets keyboard and screen-reader users bypass repeated content such as the site header, navigation menus, search controls, social links, and promotional banners. Instead of tabbing through the same controls on every page, a visitor can press Tab once and activate “Skip to content.”

WordPress describes skip links as a mechanism that lets people navigate directly to content or navigation when entering a page. This implements WCAG 2.1 Success Criterion 2.4.1, “Bypass Blocks,” which requires a mechanism for bypassing blocks repeated across web pages. The requirement applies to the experience delivered to visitors, not merely to the theme’s source code.

The link must be the first focusable control in the page document. It can sit outside a landmark; it should not be buried in the navigation list. If it appears after the menu, a keyboard user has already had to traverse the repeated controls the link is meant to bypass.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Classic-theme implementation

1. Add the link before the header and navigation

Use a child theme or another update-safe customization rather than editing a parent theme directly. Insert the link immediately after the opening <body> tag and before any logo, menu, search field, or other focusable element:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<body>
  <a class="skip-link screen-reader-text" href="#content">Skip to content</a>
  <header>…</header>
  <nav>…</nav>
  <main id="content">
    <!-- page content -->
  </main>
</body>

The spelling, capitalization, and punctuation of the link text are up to the site, but “Skip to content” is immediately understandable. The important relationship is href="#content" to id="content". The value after the hash is case-sensitive and must match exactly. Use only one element with that ID on a page.

2. Make the target the primary content landmark

Place the matching ID on the element that wraps the page’s unique content, normally the semantic <main> element. Do not point the link at the body, the header, or a decorative wrapper. A page should have one primary main landmark; if a theme already supplies one, add the ID to it instead of creating a second main element.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

3. Hide the link until it receives focus

A skip link may be visually unobtrusive at rest, but it must remain available to assistive technology and become visible when a keyboard user focuses it. First use the theme’s existing screen-reader-text utility if it has one. Verify that the utility’s focus rule actually overrides its hiding declarations. If it does not, add a specific rule for the skip link.

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: .75rem 1rem;
  background: #fff;
  color: #000;
}

The exact colors and spacing can follow the site’s design system, but the focused link needs sufficient contrast and must not be covered by a sticky header. Keep a visible focus indicator; do not replace it with outline: none unless an equally clear indicator is supplied.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Confirm that activation moves focus

Fragment links normally scroll the matching element into view. Test what the actual theme does: after pressing Enter on the skip link, press Tab once. Focus should move to the first focusable control in the main content, not continue through the header.

If the viewport moves but focus remains on the skip link, make the target programmatically focusable with tabindex="-1" and focus it when the link is activated:

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
<main id="content" tabindex="-1">
  …
</main>

Use a small, site-owned script only when testing shows it is necessary. The script should identify the fragment target, focus it without adding it to the normal Tab sequence, and preserve the expected scroll position. A target with tabindex="-1" can receive script focus but is skipped when the visitor tabs normally; the next Tab therefore reaches the first interactive control inside the main area.

Adding a skip link in a block theme

Use the Site Editor’s main landmark setting

Block themes can generate the link without manually editing PHP. In the WordPress Site Editor, open the template that contains the primary page content. Select the Group, Template Part, or Query block that wraps that content, then open its Advanced settings and set the block’s HTML element or landmark to main.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a primary content block is assigned the main landmark, WordPress states that it generates the Skip to Content link. The generated link should be before the repeated header controls in the rendered page, not merely visible somewhere in the editor canvas.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

The equivalent block markup is:

<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
<main class="wp-block-group">
  <!-- content blocks -->
</main>
<!-- /wp:group -->

Do not assign main to several independent wrappers in the same document. Check the rendered HTML to ensure there is one primary main landmark and that the generated skip link points to it.

Keep the Navigation block separate

The Navigation block supplies responsive and keyboard navigation behavior, a navigation landmark, and relevant ARIA attributes. It should remain a separate header or navigation region, while the content wrapper receives the main landmark. Do not place the skip link inside the Navigation block or inside its list of menu items.

Check every template, not only the front page

Block themes often use different templates for the home page, blog index, single posts, pages, search results, archives, and custom content types. A main landmark configured in one template does not prove that another template has one. Open each template in the Site Editor and inspect the rendered, logged-out page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How focus, scrolling, and visibility should work

Initial state

When a page loads, the skip link can be visually hidden. It must not be removed with display: none, visibility: hidden, or an equivalent rule that prevents it from receiving focus. Off-screen positioning is a common approach, provided the focus rule brings it back into the viewport.

Keyboard focus state

On the first Tab from the top of the document, the link should become clearly visible. It should sit above overlays and sticky headers, remain readable when browser zoom is increased, and retain a strong focus indicator. Test with a keyboard rather than relying on a mouse hover state.

After activation

Pressing Enter should take the viewport to the main content and place focus in that region. The next Tab should land on the first focusable element inside the main content. A visual jump without a corresponding focus change is not a complete keyboard experience because assistive technology may continue announcing the old header context.

Testing procedure for a WordPress skip link

Test the public site while logged out. An editor toolbar, admin bar, browser extension, or accessibility-testing overlay can add focusable controls and change the order you observe. Use a private window or a separate browser profile if necessary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open the page and refresh it with focus at the top of the document.
  2. Press Tab once. The first focusable item should be “Skip to content” or equivalent. If the logo, menu button, search field, or a cookie control receives focus first, the placement or another script is wrong.
  3. Confirm that the link becomes visibly identifiable when focused. Check its contrast, position, stacking order, and readability at increased zoom.
  4. Press Enter or Return. The viewport may scroll or jump to the main area.
  5. Press Tab again. Focus should continue at the first focusable control in the main content and bypass the header controls.
  6. Repeat the process on the home page, blog archive, single post, page templates, search results, and every custom template supplied by the theme.

Success on the home page does not establish success on an individual post or archive. A template can omit the link, use a different main ID, or place the target before the content even when another template works correctly.

Troubleshooting common failures

Symptom Likely cause Fix
The first Tab lands on the logo or menu The link is after another focusable element, or it is inside the navigation list. Move the link immediately after <body>, before the header and navigation. Remove duplicate links later in the header.
The link exists in source but never appears A screen-reader utility hides it on focus, or a theme rule clips it. Inspect the focused state and add a more specific .skip-link:focus rule that overrides the hiding declarations.
The page scrolls but focus remains in the header The fragment target is not focusable in the browser’s current behavior. Give the main target tabindex="-1" and focus it on activation; then repeat the Tab test.
Enter does nothing The fragment is malformed, the ID is missing, or the target ID differs in case or spelling. Compare the complete href and id. For href="#content", the page must contain exactly id="content".
The link works on the home page but not on posts Different templates use different wrappers or omit the generated main landmark. Configure or repair the link and target in every template, then test each logged-out URL.
Two main landmarks or duplicate IDs appear A block setting and a manually added wrapper both define primary content. Keep one primary main landmark and one unique target ID. Remove the redundant wrapper or generated/manual link.
The focused link is hidden behind a sticky header The skip link’s stacking order or top offset is too low. Raise its z-index, set a visible background, and adjust its focused position so the entire control is unobscured.
The test order changes in the editor WordPress editor controls or the admin toolbar are included in the tab sequence. Test an unauthenticated front-end view in another browser or a private window.

When more than one skip link is appropriate

One “Skip to content” link is sufficient for the common layout of a single repeated header followed by one primary content area. WordPress also permits multiple skip links when a design has several independent regions that users may reasonably want to bypass, such as separate primary and secondary navigation areas, a large sidebar, or a footer menu.

Keep the first link aimed at the most important destination—normally the main content. Additional links should follow in a predictable order and point to unique IDs such as a primary navigation landmark, a complementary region, or the footer. Every destination must be present on the templates where its link appears, and every link must be tested for correct focus placement.

Deployment checklist

  • The first focusable control in the rendered page is the skip link.
  • The link is outside the navigation list and precedes repeated header controls.
  • The fragment in href exactly matches one unique ID on the primary content target.
  • The target is a semantic main landmark, not a decorative or empty wrapper.
  • The link is hidden only visually at rest and becomes visible on keyboard focus.
  • Focus moves into the main area after activation, and the next Tab reaches its first interactive control.
  • There is one primary main landmark per document and no duplicate target IDs.
  • Home, archive, single, page, search, and custom templates have all been tested while logged out.
  • Block-theme settings and classic-theme customizations are kept update-safe and documented for future template changes.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.