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

@@ -566,7 +566,7 @@ The design does **not** need to change - only the vocabulary of the markup.
### I - `templates/nav.php` & `templates/search-bar.php`
- [ ] **`<div class="site-nav__links">`** wraps the centre nav links purely for flex grouping.
- [x] **`<div class="site-nav__links">`** wraps the centre nav links purely for flex grouping.
Replace with `<ul>` + `<li>` children (links inside a nav belong in a list - standard
pattern). The `<a>` elements stay; CSS targets `nav ul` / `nav li` / `nav a` directly,
removing `.site-nav__links`, `.site-nav__link`, `.site-nav__right` classes entirely.