From c4ea12d4458f02b288fc2daa854adf161e2e42f5 Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 15 May 2026 18:27:56 +0100 Subject: [PATCH] fix(a11y): move skip link above eejs body block so plugins can't outrank it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The WITH_PLUGINS Playwright suite caught a regression in the previous commit: ep_set_title_on_pad's eejsBlock_body hook prepends a
that contains a focusable Loading... into the body block, putting that anchor ahead of #skip-to-content in DOM tab order. First Tab landed on the title link instead of the skip link, breaking the WCAG 2.4.1 entry path. Moving the skip link before <% e.begin_block("body"); %> takes it out of the plugin-modifiable region — eejsBlock_body hooks can prepend to the block content but cannot reach above the block's own start tag. Verified locally with ep_set_title_on_pad installed: On load: BODY After Tab 1: A#skip-to-content After Tab 2: A (pad_title's Loading link — plugin content) Refs #7255 Co-Authored-By: Claude Opus 4.7 (1M context) --- src/templates/pad.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/templates/pad.html b/src/templates/pad.html index 12a77bc8c..3e981add9 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -65,14 +65,18 @@ - <% e.begin_block("body"); %> - + focus into the editor iframe rather than just scrolling. + MUST live outside the `body` eejs block: plugins like + ep_set_title_on_pad use eejsBlock_body to prepend a focusable + title bar, which would otherwise come before this link in DOM + order and steal the first Tab. --> + <% e.begin_block("body"); %> +