mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
a11y: nav aria-label, search role=search + label, card hover motion guard
- templates/nav.php: add aria-label="Navigation principale" to <nav>; emit aria-current="page" on the active link alongside the existing CSS class so screen readers announce the current page without relying on colour/style alone - templates/search-bar.php: add role="search" + aria-label="Recherche" to the <form>; add a visually-hidden <label for="site-search-input"> linked to the input via id="site-search-input", satisfying WCAG 3.3.2 (labels/instructions) and 4.1.2 (name/role/value) — placeholder text alone is not a label - public/assets/main.css: add @media (prefers-reduced-motion: reduce) block that sets transition:none and transform:none on .card__media img/video hover, so the scale(1.02) zoom is fully suppressed for users who opt out of motion (WCAG 2.3.3 / prefers-reduced-motion); the global transition-duration guard in common.css already covers all other transitions but does not zero the transform value itself Fixes TODO sections: G (nav/search-bar landmark names), I (site-search form ARIA), 3.3.2 (search input label), prefers-reduced-motion (card hover transform gate)
This commit is contained in:
@@ -215,3 +215,15 @@
|
||||
font-weight: 600;
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
/* Suppress card hover scale for users who prefer reduced motion */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.card__media img,
|
||||
.card__media video {
|
||||
transition: none;
|
||||
}
|
||||
.card:hover .card__media img,
|
||||
.card:hover .card__media video {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user