From 986945a347ae7349ffe83a7e9373a34cb7280f91 Mon Sep 17 00:00:00 2001
From: Pontoporeia
Date: Tue, 31 Mar 2026 15:28:47 +0200
Subject: [PATCH] fix(a11y): move pages-edit EasyMDE scripts to head/footer,
add h1 to home, fix stale TODO items
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- pages-edit.php: EasyMDE CDN JS URL moved to $extraJs (rendered by footer.php before
(WCAG 4.1.1)
- pages-edit.php: add keyboard-trap hint below the editor textarea:
'Appuyez sur Échap pour quitter l'éditeur au clavier.' (WCAG 2.1.2)
- templates/admin/footer.php: extend to support $extraJsInline (raw inline script string)
- index.php: add Mémoires de l'ERG
inside so the page has
a document heading (WCAG 2.4.6; h2 columns in search.php already had a sr-only h1)
- TODO.md: mark completed items as [x]: skip links (2.4.1), focus-visible / outline:none
removal (2.4.7), search.php h1 + index.php h1 (2.4.6), pages-edit.php invalid HTML (4.1.1),
EasyMDE keyboard trap hint (2.1.2)
---
TODO.md | 19 ++++++++++---------
public/admin/pages-edit.php | 28 +++++++++++++++-------------
public/index.php | 1 +
templates/admin/footer.php | 3 +++
4 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/TODO.md b/TODO.md
index a2673d1..a1c9f9d 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1077,14 +1077,14 @@ Current state: **zero ARIA attributes, zero skip links, zero focus-visible style
#### 2.1.2 No keyboard trap
-- [ ] **EasyMDE editor in `pages-edit.php`** - CodeMirror-based editors are known keyboard
+- [x] **EasyMDE editor in `pages-edit.php`** - CodeMirror-based editors are known keyboard
traps; Tab inside the editor inserts a tab character rather than moving focus out. EasyMDE
provides an escape route (Escape key exits the editor). Verify this works and document
it with a visible hint below the editor (`Appuyez sur Échap pour quitter l'éditeur`).
#### 2.4.1 Bypass blocks - skip link
-- [ ] **No skip-to-main-content link exists on any page** - every page loads with focus on
+- [x] **No skip-to-main-content link exists on any page** - every page loads with focus on
the browser chrome, then Tab cycles through the nav and search bar before reaching ``.
On the home page that means tabbing through 4 nav links before reaching 24 thesis cards.
Add `Aller au contenu principal` as the
@@ -1133,14 +1133,14 @@ Current state: **zero ARIA attributes, zero skip links, zero focus-visible style
a label/metadata, not a heading. This is flagged in the semantic audit but it is also
directly a WCAG 2.4.6 failure (heading does not describe the topic of the page).
-- [ ] **`search.php` répertoire index: `