admin: semantic HTML improvements — dl stats, section cards, th scope

- admin/index.php: replace <div class="admin-stats"> with <dl>; inner
  <div class="admin-stat__number"> → <dd>, <div class="admin-stat__label"> → <dt>;
  use CSS order to keep number visually first; add scope="col" to all 9 <th> cells

- admin/thanks.php: replace all four <div class="admin-thesis-info"> wrappers
  with <section> elements; remove the class entirely; add scope="col" to
  the files table <th> cells

- admin/tags.php: add scope="col" to all 3 <th> cells

- admin/pages.php: add scope="col" to all 4 <th> 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)
This commit is contained in:
Pontoporeia
2026-04-01 16:50:53 +02:00
parent 8e36f98139
commit 573747303f
6 changed files with 49 additions and 44 deletions

View File

@@ -98,20 +98,20 @@ document.addEventListener('DOMContentLoaded', () => {
</div>
<!-- Stats (always reflects full DB, independent of active filters) -->
<div class="admin-stats">
<dl class="admin-stats">
<div class="admin-stat">
<div class="admin-stat__number"><?= $stats['total'] ?></div>
<div class="admin-stat__label">TFE total</div>
<dt class="admin-stat__label">TFE total</dt>
<dd class="admin-stat__number"><?= $stats['total'] ?></dd>
</div>
<div class="admin-stat">
<div class="admin-stat__number"><?= $stats['published'] ?></div>
<div class="admin-stat__label">Publiés</div>
<dt class="admin-stat__label">Publiés</dt>
<dd class="admin-stat__number"><?= $stats['published'] ?></dd>
</div>
<div class="admin-stat">
<div class="admin-stat__number"><?= $stats['pending'] ?></div>
<div class="admin-stat__label">En attente</div>
<dt class="admin-stat__label">En attente</dt>
<dd class="admin-stat__number"><?= $stats['pending'] ?></dd>
</div>
</div>
</dl>
<!-- Filters -->
<form class="admin-filters" method="get" action="/admin/">
@@ -160,15 +160,15 @@ document.addEventListener('DOMContentLoaded', () => {
<table class="admin-table">
<thead>
<tr>
<th><input type="checkbox" onchange="toggleAll(this)"></th>
<th>ID</th>
<th>Titre</th>
<th>Auteur(s)</th>
<th>Année</th>
<th>Orientation</th>
<th>AP</th>
<th>Statut</th>
<th>Actions</th>
<th scope="col"><input type="checkbox" onchange="toggleAll(this)"></th>
<th scope="col">ID</th>
<th scope="col">Titre</th>
<th scope="col">Auteur(s)</th>
<th scope="col">Année</th>
<th scope="col">Orientation</th>
<th scope="col">AP</th>
<th scope="col">Statut</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>