Skip to content

Commit 70ecc6b

Browse files
committed
Themes: Add an ID to the block theme skip link.
Add the ID `wp-skip-link` to the block theme generated skip link, so that block themes have a standardized target at the top of the `body` element. Props philliproth, audrasjb, debarghyabanerjee, sabernhardt, joedolson, apermo. Fixes #62311. git-svn-id: https://develop.svn.wordpress.org/trunk@59559 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9dd87b8 commit 70ecc6b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wp-includes/theme-templates.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ function wp_enqueue_block_template_skip_link() {
203203
// Create the skip link.
204204
skipLink = document.createElement( 'a' );
205205
skipLink.classList.add( 'skip-link', 'screen-reader-text' );
206+
skipLink.id = 'wp-skip-link';
206207
skipLink.href = '#' + skipLinkTargetID;
207208
skipLink.innerHTML = '<?php /* translators: Hidden accessibility text. */ esc_html_e( 'Skip to content' ); ?>';
208209

0 commit comments

Comments
 (0)