mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Add <span class="sr-only">, YEAR</span> to each thesis card <p> in public/index.php. Screen readers now read "Author – Title, 2024" instead of bare "Author – Title", so two theses sharing the same title produce distinct accessible names (WCAG 2.4.4 Link Purpose — In Context). Also audit and close WCAG 2.4.3: the tfe.php back link (<a class="tfe-back-link"> ← Retour</a>) is already the first child of <header class="tfe-left"> in DOM order, preceding <h1 class="tfe-title">. No code change needed; TODO item marked done.
80 lines
5.0 KiB
Markdown
80 lines
5.0 KiB
Markdown
# Accessibility Audit (WCAG 2.1 AA)
|
|
|
|
## 1.1.1 Non-text content (alt text)
|
|
|
|
- [x] **Admin `<nav>` "✕ Réinitialiser" and "✕" remove buttons** — wrap `✕` in `<span aria-hidden="true">✕</span>`; add `aria-label="Supprimer ce membre du jury"` on jury remove buttons in `add.php`/`edit.php`
|
|
|
|
## 1.3.1 Info and relationships
|
|
|
|
- [x] **Admin form rows: multi-input rows (languages, formats)** — `checkbox-list.php` partial now wraps checkboxes in `<fieldset class="admin-checkbox-group">` with a `<legend class="sr-only">` for AT grouping
|
|
|
|
- [x] **Status badges in `admin/index.php` convey state by colour alone** — `status-badge.php` partial emits `<span aria-label="Statut : Publié"><span aria-hidden="true">● </span>Publié</span>` (circle symbol is non-colour indicator); both publish and access badges implemented
|
|
|
|
## 1.3.4 / 1.3.5 Orientation & Input purpose
|
|
|
|
- [x] **No `autocomplete` attributes on personal data fields** — `add.php`/`edit.php`: `autocomplete="name"` on author fields, `autocomplete="email"` on mail fields (via `$attrs` in `text-field.php`)
|
|
|
|
## 1.4.1 Use of colour
|
|
|
|
- [x] **Active nav link has no non-colour indicator** — admin nav: `border-bottom: 2px solid currentColor` added for `[aria-current="page"]` in `admin.css`; public nav already had `border-bottom` in `common.css`
|
|
|
|
- [x] **Admin purple `#9557b5` as text colour** — `--admin-purple` was an undefined variable referenced only in pagination hover; replaced with `--accent-primary` (same value, #9557b5). The variable is only used for `border-color` and `color` on `:hover` state of pagination buttons (not body text), so no contrast violation in practice. Pagination buttons remain small-text; hover state is non-essential information so this is acceptable.
|
|
|
|
## 1.4.4 Resize text
|
|
|
|
- [ ] **Verify no text is set in `px`** — ensure `width: 14px; height: 14px` on checkboxes and similar elements do not prevent text scaling
|
|
|
|
## 1.4.12 Text spacing
|
|
|
|
- [ ] **No text-spacing override test done** — verify WCAG 1.4.12 bookmarklet does not cause content clipping (especially `overflow: hidden` on `.card__media` and tight `aspect-ratio: 4/3`)
|
|
|
|
## 2.1.1 Keyboard
|
|
|
|
- [ ] **Jury "✕" remove buttons in `add.php`/`edit.php`** — add `aria-label` for keyboard discoverability
|
|
|
|
## 2.4.3 Focus order
|
|
|
|
- [x] **On `tfe.php` the `← Retour` back link is at the bottom of the left column in DOM** — already fixed; `<a class="tfe-back-link">← Retour</a>` is the first child of `<header class="tfe-left">`, which precedes `<h1 class="tfe-title">` in DOM order
|
|
|
|
## 2.4.4 Link purpose
|
|
|
|
- [x] **Home page cards: if two theses share the same title, identical link texts exist** — `public/index.php` card `<p>` now appends `<span class="sr-only">, YEAR</span>` when `$item['year']` is set, giving screen-reader users a unique link name per thesis
|
|
|
|
## 2.5.3 Label in name
|
|
|
|
- [x] **`<a class="clear-filter">✕ Réinitialiser</a>`** — wrap `✕` in `<span aria-hidden="true">`
|
|
- [x] **Admin jury remove buttons `✕`** — `aria-label="Supprimer ce lecteur"` replaces the symbol
|
|
|
|
## 2.5.5 Target size
|
|
|
|
- [x] **Pagination buttons are `2rem` (32px)** — increase to `min-height: 2.75rem; min-width: 2.75rem` (44px)
|
|
- [x] **Admin `.admin-btn-sm` (~28px)** — increase to minimum 32px with padding
|
|
- [x] **Admin bulk action buttons and jury remove `✕` buttons (~28px)** — increase target size
|
|
|
|
## 3.1.1 Language of page
|
|
|
|
- [ ] **All public pages have `<html lang="fr">`** — verify this is true after any template changes ✓ (no action needed unless templates change)
|
|
|
|
## 3.3.1 Error identification
|
|
|
|
- [x] **`add.php`/`edit.php` validation errors** — `flash-messages.php` already emits `<p role="alert" data-type="error">` for errors and `<p role="status">` for success
|
|
- [ ] **`add.php`/`edit.php` `autofocus` on first invalid field** — requires controller to pass back which field failed; deferred (larger refactor)
|
|
|
|
## 3.3.2 Labels or instructions
|
|
|
|
- [ ] **Admin jury "Lecteur·ices" label has no `for` attribute** — wrap lecteur rows in `<fieldset>/<legend>` or use `aria-describedby`
|
|
|
|
## 4.1.2 Name, role, value
|
|
|
|
- [ ] **Custom "Externe" checkbox for jury members has no group context** — add `aria-label="[Nom du promoteur] est externe"` dynamically via JS, or `aria-describedby` pointing to the adjacent name input
|
|
|
|
- [ ] **`<video>` elements on `tfe.php` have no captions** — add `<track kind="captions">` slot in template; document caption requirement in admin upload form
|
|
|
|
- [ ] **Admin `<select>` for visibility/access in `edit.php` uses truncated option text** — use full description in option text (or `title` attribute); keep truncated text only for visual display
|
|
|
|
- [ ] **Bulk publish/unpublish JS does not announce result to screen readers** — add `role="alert"` to error messages and `role="status"` to success messages across all admin pages
|
|
|
|
## 5 - Motion & user preferences
|
|
|
|
- [ ] **`prefers-color-scheme` not respected** — site has fixed white public / fixed dark admin themes; consider a dark-mode variant for public pages (not a WCAG failure, but quality-of-life)
|