refactor(nav): replace div+BEM classes with semantic ul/li in public nav

templates/nav.php:
- Replace <div class="site-nav__links"> with <ul role="list"> + <li> children
- Move À Propos link inside the list (was a loose sibling <a>)
- Remove .site-nav__link and .site-nav__link--active classes from all <a> elements
- Active state now driven solely by aria-current="page" (already present)

public/assets/common.css:
- Remove .site-nav__links, .site-nav__link, .site-nav__link:hover, .site-nav__link--active rules
- Add .site-nav ul (flex, gap, list-style reset), .site-nav ul a, .site-nav ul a:hover
- Active indicator: .site-nav ul a[aria-current="page"] — self-documenting, screen-reader-announced

Fixes TODO section I (nav semantic HTML audit). All three BEM nav-link classes deleted;
zero references remain in the codebase.
This commit is contained in:
Pontoporeia
2026-03-29 15:50:41 +02:00
parent 7a4a471838
commit 6657c4fbbe
3 changed files with 22 additions and 16 deletions

View File

@@ -69,13 +69,16 @@ a:hover {
font-weight: 400;
}
.site-nav__links {
.site-nav ul {
display: flex;
gap: 3rem;
align-items: center;
list-style: none;
margin: 0;
padding: 0;
}
.site-nav__link {
.site-nav ul a {
font-size: 0.85rem;
letter-spacing: 0.12em;
text-transform: uppercase;
@@ -85,11 +88,11 @@ a:hover {
transition: opacity 0.15s;
}
.site-nav__link:hover {
.site-nav ul a:hover {
opacity: 1;
}
.site-nav__link--active {
.site-nav ul a[aria-current="page"] {
opacity: 1;
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
padding-bottom: 1px;