mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
wcag: fix 2.4.4 duplicate link text on home page cards
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.
This commit is contained in:
@@ -116,7 +116,7 @@ $bodyClass = 'home-body';
|
||||
<span class="card__gradient-title"><?= htmlspecialchars($item['title']) ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<p><?= htmlspecialchars($item["authors"] ?? '') ?><?php if (!empty($item['authors']) && !empty($item['title'])): ?> – <?php endif; ?><?= htmlspecialchars($item["title"]) ?></p>
|
||||
<p><?= htmlspecialchars($item["authors"] ?? '') ?><?php if (!empty($item['authors']) && !empty($item['title'])): ?> – <?php endif; ?><?= htmlspecialchars($item["title"]) ?><?php if (!empty($item['year'])): ?><span class="sr-only">, <?= (int)$item['year'] ?></span><?php endif; ?></p>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user