Make WordPress Core

Opened 23 months ago

Closed 23 months ago

Last modified 22 months ago

#55552 closed defect (bug) (invalid)

Status of skip-link bug unclear

Reported by: clarus-dignus's profile Clarus Dignus Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.9.3
Component: General Keywords:
Focuses: accessibility, javascript Cc:


Core Relevance

Skip-links are part of WordPress core. See the_block_template_skip_link() in /wp-includes/block-template.php.

Bug Description

[In versions of IE and Chrome:] "While the visual focus of the browser shifts to the element being linked to, the input focus stays where it was. For example, if I press tab and then enter on a “skip to content” link, the browser will scroll down to that element so I can read the content. If I then press tab again, the input focus moves to the next focusable element after the “skip to content” link, not to the next link in the content area."

Solutions recommends twentynineteen_skip_link_focus_fix() but it seems to only apply to IE 11, not previous IE versions or Chrome versions:

The Underscores starter theme incorporated a similar fix that seems to more broadly fix IE and Chrome:

Status Questions

Is the skip-link fix part of WordPress core? If so, what browsers and browser versions does it fix?

Change History (5)

#1 @Clarus Dignus
23 months ago

  • Summary changed from Status of skip-link bugs unclear to Status of skip-link bug unclear

#2 @Clarus Dignus
23 months ago

It was decided a few weeks ago that the skip-link focus fix won't be deprecated in the core themes (Twenty Thirteen to Twenty Twenty-One): #54421

The ticket was closed as wontfix.

It's not clear to me if the fix is now being handled by core, Twenty-Twenty Two, both, or neither.

If I'm creating a block theme from scratch using FSE, do I need to add an action to my functions.php to apply the fix?

Last edited 23 months ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.

23 months ago

#4 @joedolson
23 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi, @clarus-dignus! The skip-link fix was a temporary measure intended to provide skip link support to browsers which did not properly support them. This was never a bug in WordPress; it was a bug in browsers.

This bug was fixed in Chromium in 2017, and has propagated to all major browsers that did not already support it since then. The only remaining browser that still exhibits this issue is Internet Explorer, and no version of Internet Explorer is still supported by Microsoft or by WordPress core.

As such, there is no longer any need for this fix unless you have a particular need to provide support for Internet Explorer. WordPress is no longer adding this fix to new themes, and there will be no core support for the code. The wontfix decision on older core themes in #54421 is inline with the decision not to remove support for older browser from themes that previously offered that support.

#5 @Clarus Dignus
22 months ago

Thanks for the clarification.

Note: See TracTickets for help on using tickets.