WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#53368 new defect (bug)

Auto-generated skip-link gets added in classic templates and not just in block templates

Reported by: aristath Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

In https://core.trac.wordpress.org/changeset/51003 we introduced the the_block_template_skip_link function which adds a skip-link for block themes/templates. However, since the block-templates theme-support is enabled by default and is opt-out, the skip-link gets added regardless of whether we're on a block template or not.

A check should be added to properly detect if the current template is block-template or not, and only add the skip-link when needed.

There is a PR in Gutenberg (https://github.com/WordPress/gutenberg/pull/32451) so it should be backported to core.

Change History (1)

Note: See TracTickets for help on using tickets.