Skip to content

Skip to: Print the link target script through the core helper - #778

Merged
obenland merged 1 commit into
trunkfrom
update/inline-script-output
Oct 14, 2026
Merged

obenland merged 1 commit into
trunkfrom
update/inline-script-output

Conversation

@obenland

@obenland obenland commented Oct 9, 2026

Copy link
Copy Markdown
Member

The skip link's target script is the last inline script in this plugin that echoes its own <script> tag. This passes it to wp_print_inline_script_tag() instead, the same function core uses for inline scripts added with wp_add_inline_script(), so it is built the same way and goes through the wp_inline_script_attributes filter. The JavaScript is unchanged and still prints in the footer.

Testing steps

  1. On wordpress.org, press Tab once after the page loads. The "Skip to content" link appears.
  2. Activate it. Focus moves to the main content.

🤖 Generated with Claude Code

The script that points the skip link at its target is handed to the WordPress inline script helper, matching how other inline scripts on the sites are printed. The script itself is unchanged.
Copilot AI balanced review requested due to automatic review settings October 9, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@obenland
obenland merged commit 3b104f0 into trunk Oct 14, 2026
2 checks passed
@obenland
obenland deleted the update/inline-script-output branch October 14, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants