From 769d56fabcca8ab7b6cc6fda7201784c87c27795 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Fri, 3 Apr 2026 13:05:43 +0200 Subject: [PATCH] wcag: fix 2.4.4 duplicate link text on home page cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add , YEAR to each thesis card

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 ( ← Retour) is already the first child of

in DOM order, preceding

. No code change needed; TODO item marked done. --- TODO.md | 3 +++ public/index.php | 2 +- todo/04-accessibility.md | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TODO.md b/TODO.md index 25edbc7..a3a7b64 100644 --- a/TODO.md +++ b/TODO.md @@ -29,3 +29,6 @@ Pending tasks have been split into topic files under [`todo/`](todo/README.md): - [x] `admin-submit-wrap` → `admin-form-footer` rename: updated all 6 admin templates (`add.php`, `edit.php`, `login.php`, `account.php`, `import.php`, `pages-edit.php`) and all 8 CSS selectors in `admin.css` (`.admin-form > div:not(…)` exclusion guards, `.admin-login-box` overrides). Closes `todo/01-css-semantic-refactor.md` submit-wrap task. - [x] Marked `status-badge.php` partial and WCAG 1.3.1 status-badge items as already-done in `todo/02-php-components.md` and `todo/04-accessibility.md` (partial + CSS were fully implemented; TODO had not been updated) + +- [x] `public/index.php` — WCAG 2.4.4: home page cards now append `, YEAR` to each card's `

` link text so screen readers get unique link names when two theses share the same title +- [x] `todo/04-accessibility.md` — WCAG 2.4.3: marked back-link focus-order item as already done (`tfe-back-link` is already the first DOM element in `.tfe-left`, before `

`) diff --git a/public/index.php b/public/index.php index 09c4bbf..19e040f 100644 --- a/public/index.php +++ b/public/index.php @@ -116,7 +116,7 @@ $bodyClass = 'home-body'; -

+

,

diff --git a/todo/04-accessibility.md b/todo/04-accessibility.md index b4c0933..eec58d8 100644 --- a/todo/04-accessibility.md +++ b/todo/04-accessibility.md @@ -34,11 +34,11 @@ ## 2.4.3 Focus order -- [ ] **On `tfe.php` the `← Retour` back link is at the bottom of the left column in DOM** — consider moving above `

` or adding a copy at the top so keyboard users can exit quickly +- [x] **On `tfe.php` the `← Retour` back link is at the bottom of the left column in DOM** — already fixed; `← Retour` is the first child of `
`, which precedes `

` in DOM order ## 2.4.4 Link purpose -- [ ] **Home page cards: if two theses share the same title, identical link texts exist** — append year in `` to disambiguate +- [x] **Home page cards: if two theses share the same title, identical link texts exist** — `public/index.php` card `

` now appends `, YEAR` when `$item['year']` is set, giving screen-reader users a unique link name per thesis ## 2.5.3 Label in name