From 573747303f42931244671a0f3d345f44b7d75136 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Wed, 1 Apr 2026 16:50:53 +0200 Subject: [PATCH] =?UTF-8?q?admin:=20semantic=20HTML=20improvements=20?= =?UTF-8?q?=E2=80=94=20dl=20stats,=20section=20cards,=20th=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - admin/index.php: replace
with
; inner
,
; use CSS order to keep number visually first; add scope="col" to all 9 cells - admin/thanks.php: replace all four
wrappers with
elements; remove the class entirely; add scope="col" to the files table cells - admin/tags.php: add scope="col" to all 3 cells - admin/pages.php: add scope="col" to all 4 cells - admin.css: rename .admin-thesis-info selectors to .admin-main > section (element + context selector — no class needed); add display:flex + flex-direction:column to .admin-stat so CSS order property works correctly Addresses TODO items: section X (admin-stats dl, th scope), XI (tags th scope), XII (admin-thesis-info → section), XIII (pages.php th scope) --- TODO.md | 10 +++++----- public/admin/index.php | 34 +++++++++++++++++----------------- public/admin/pages.php | 8 ++++---- public/admin/tags.php | 6 +++--- public/admin/thanks.php | 18 +++++++++--------- public/assets/css/admin.css | 17 +++++++++++------ 6 files changed, 49 insertions(+), 44 deletions(-) diff --git a/TODO.md b/TODO.md index c3b9ca5..fb67469 100644 --- a/TODO.md +++ b/TODO.md @@ -907,7 +907,7 @@ Once the above is applied, the following classes become deletable (element name ### X - `public/admin/index.php` (TFE list) -- [ ] **`
` with `
` children** - the stats +- [x] **`
` with `
` children** - the stats (total, published, pending) are a set of key-value pairs. Replace with `
`: `
` → `
`; each `
` → `
` kept (valid `
` child for grouping, per spec); @@ -923,7 +923,7 @@ Once the above is applied, the following classes become deletable (element name with `
`. Not a full semantic element replacement, but adds correct ARIA role for the keyboard/AT pattern of a toolbar. -- [ ] **`` is correct** - tabular data, right element. No change +- [x] **`
` is correct** - tabular data, right element. No change needed. The ``, ``, ``, `
`, `` structure is correct. Minor: `` cells have no `scope="col"` attribute - add it for screen reader column association (``). @@ -940,15 +940,15 @@ Once the above is applied, the following classes become deletable (element name `style="margin-top:.35rem;"` on two of the three forms → move to CSS (e.g. `.admin-inline-form + .admin-inline-form` selector in `admin.css`). -- [ ] **`` with `
` cells lacking `scope="col"`** - same as `index.php`. +- [x] **`` with `
` cells lacking `scope="col"`** - same as `index.php`. ### XII - `public/admin/thanks.php` -- [ ] **`
` blocks** - each is a labelled section with a `
` +- [x] **`
` blocks** - each is a labelled section with a `
` inside it (already using `
/
/
` correctly - good!). The outer wrapper `
` could be a `
` with the `

` as its heading, making the structure `

...

...
`. Removes `.admin-thesis-info` class; CSS targets - `main > section`. + `.admin-main > section`. ### XIII - `public/admin/account.php` diff --git a/public/admin/index.php b/public/admin/index.php index 9316407..1a251bf 100644 --- a/public/admin/index.php +++ b/public/admin/index.php @@ -98,20 +98,20 @@ document.addEventListener('DOMContentLoaded', () => {

-
+
-
-
TFE total
+
TFE total
+
-
-
Publiés
+
Publiés
+
-
-
En attente
+
En attente
+
-
+
@@ -160,15 +160,15 @@ document.addEventListener('DOMContentLoaded', () => { - - - - - - - - - + + + + + + + + + diff --git a/public/admin/pages.php b/public/admin/pages.php index 955b8bb..ef3f83d 100644 --- a/public/admin/pages.php +++ b/public/admin/pages.php @@ -31,10 +31,10 @@ unset($_SESSION['success']);
IDTitreAuteur(s)AnnéeOrientationAPStatutActionsIDTitreAuteur(s)AnnéeOrientationAPStatutActions
- - - - + + + + diff --git a/public/admin/tags.php b/public/admin/tags.php index fe1c5d7..443b751 100644 --- a/public/admin/tags.php +++ b/public/admin/tags.php @@ -38,9 +38,9 @@ unset($_SESSION['admin_error'], $_SESSION['admin_success']);
SlugTitreMis à jourActionSlugTitreMis à jourAction
- - - + + + diff --git a/public/admin/thanks.php b/public/admin/thanks.php index 5554c4a..b273764 100644 --- a/public/admin/thanks.php +++ b/public/admin/thanks.php @@ -73,7 +73,7 @@ $pageTitle = "Récapitulatif TFE";

Retour au formulaire

-
+

Informations de base

Identifiant
@@ -84,9 +84,9 @@ $pageTitle = "Récapitulatif TFE";
Auteur·ice(s)
Année
-
+ -
+

Détails académiques

Orientation
@@ -96,9 +96,9 @@ $pageTitle = "Récapitulatif TFE";
Promoteur·ice(s)
-
+ -
+

Contenu

@@ -117,13 +117,13 @@ $pageTitle = "Récapitulatif TFE";
Lien
-
+ -
+

Fichiers

NomTFE associésActionsNomTFE associésActions
- + @@ -135,7 +135,7 @@ $pageTitle = "Récapitulatif TFE";
TypeFichierTailleDate
TypeFichierTailleDate
-
+
diff --git a/public/assets/css/admin.css b/public/assets/css/admin.css index 9b6d0b0..8c13e50 100644 --- a/public/assets/css/admin.css +++ b/public/assets/css/admin.css @@ -309,6 +309,8 @@ border-radius: 4px; padding: 1rem 1.5rem; min-width: 140px; + display: flex; + flex-direction: column; } .admin-stat__number { @@ -316,12 +318,15 @@ font-weight: 700; color: var(--admin-purple); line-height: 1; + order: 1; /* visually first despite dt/dd semantic order */ + margin: 0; } .admin-stat__label { font-size: 0.82rem; color: var(--admin-text-muted); margin-top: 0.25rem; + order: 2; /* visually second */ } /* ---- Filters bar ---- */ @@ -514,34 +519,34 @@ gap: 0.5rem; } -/* Thesis info (thanks page) */ -.admin-thesis-info { +/* Thesis info sections (thanks page) */ +.admin-main > section { border: 1px solid var(--admin-border); border-radius: 6px; padding: 1.5rem; margin-bottom: 1.5rem; } -.admin-thesis-info h2 { +.admin-main > section h2 { margin: 0 0 1rem; font-size: 1.2rem; border-bottom: 1px solid var(--admin-border); padding-bottom: 0.5rem; } -.admin-thesis-info dl { +.admin-main > section dl { display: grid; grid-template-columns: 180px 1fr; gap: 0.4rem 1rem; } -.admin-thesis-info dt { +.admin-main > section dt { font-weight: 600; font-size: 0.88rem; color: var(--admin-text-muted); } -.admin-thesis-info dd { +.admin-main > section dd { margin: 0; font-size: 0.9rem; }