From 5049be0523771dbe02c3ff304a3fae1382bdda89 Mon Sep 17 00:00:00 2001 From: topkoa Date: Sun, 12 Jul 2026 20:28:33 -0400 Subject: [PATCH] fix(panes): the dock is born empty, so say so MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit panes.css hides an empty dock (.fb-pane-dock.is-empty { display: none }), but the element was created without the class — so between creation and the first card it was a visible-to-CSS, announced-to-screen-readers role="region" landmark containing nothing. Harmless in practice today (the dock is created lazily, on the same tick as the card that prompted it), but the CSS contract should hold from first paint rather than from the first _syncEmpty(), and any future caller of dock() gets the right thing for free. Found by CodeRabbit on #928. Signed-off-by: topkoa --- static/panes/pane-dock.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/panes/pane-dock.js b/static/panes/pane-dock.js index 8c05a32..70a7018 100644 --- a/static/panes/pane-dock.js +++ b/static/panes/pane-dock.js @@ -33,7 +33,11 @@ if (!dockEl) { dockEl = document.createElement('div'); dockEl.id = 'fb-pane-dock'; - dockEl.className = 'fb-pane-dock'; + // `is-empty` from the start: panes.css hides an empty dock, and a dock + // born without the class is a visible-to-CSS, announced-to-screen-readers + // `role="region"` landmark with nothing in it until the first card + // arrives. Born empty, because it is. + dockEl.className = 'fb-pane-dock is-empty'; dockEl.setAttribute('role', 'region'); dockEl.setAttribute('aria-label', 'Panes'); document.body.appendChild(dockEl);