Make WordPress Core

Changeset 59559


Ignore:
Timestamp:
12/23/2024 11:01:23 PM (5 hours ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme-templates.php

    r56932 r59559  
    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' ); ?>';
Note: See TracChangeset for help on using the changeset viewer.