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 ); inline EasyMDE init block moved to $extraJsInline, emitted by footer.php via new ` floating in (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 `` 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: `

` headings inside columns are correct** - "Années", +- [x] **`search.php` répertoire index: `

` headings inside columns are correct** - "Années", "Catégories", "Étudiantes", "Mots-clés" as `

` under a page with no `

` is a skip. Add an `

` for the page (visually hidden if needed): `

Répertoire

`. - Same for `index.php` which has no heading at all. + `index.php` now has `

Mémoires de l'ERG

` inside `
`. #### 2.4.7 Focus visible -- [ ] **No `:focus-visible` style defined anywhere in the public CSS** - `common.css`, +- [x] **No `:focus-visible` style defined anywhere in the public CSS** - `common.css`, `main.css`, `search.css`, `tfe.css`, and `apropos.css` contain zero `:focus` or `:focus-visible` rules. `modern-normalize` does not add any either. The browser's default focus ring is the only indicator, and it is suppressed by `outline: none` on @@ -1155,7 +1155,7 @@ Current state: **zero ARIA attributes, zero skip links, zero focus-visible style in `common.css`. This single rule covers every ``, `
- - - diff --git a/public/index.php b/public/index.php index 0599907..53fb244 100644 --- a/public/index.php +++ b/public/index.php @@ -80,6 +80,7 @@ $extraCss = ['assets/main.css'];
+

Mémoires de l'ERG

  • diff --git a/templates/admin/footer.php b/templates/admin/footer.php index 615d1bc..cd19b04 100644 --- a/templates/admin/footer.php +++ b/templates/admin/footer.php @@ -1,5 +1,8 @@ + + +