#55552 closed defect (bug) (invalid)
Status of skip-link bug unclear
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.9.3 |
Component: | General | Keywords: | |
Focuses: | accessibility, javascript | Cc: |
Description
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."
— https://humanwhocodes.com/blog/2013/01/15/fixing-skip-to-content-links/
Solutions
WordPress.org recommends twentynineteen_skip_link_focus_fix() but it seems to only apply to IE 11, not previous IE versions or Chrome versions:
https://make.wordpress.org/themes/2019/07/14/how-to-add-and-test-skip-links/
The Underscores starter theme incorporated a similar fix that seems to more broadly fix IE and Chrome:
https://github.com/Automattic/_s/pull/136
https://github.com/Automattic/_s/pull/139/files
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
@
3 years ago
- Summary changed from Status of skip-link bugs unclear to Status of skip-link bug unclear
This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.
3 years ago
#4
@
3 years 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.
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?