search.php: semantic HTML overhaul of répertoire index and results view

- Replace 4x <div class="repertoire-col"> with <section>; remove
  .repertoire-col__header class, CSS now targets section > h2
- Wrap all index link groups in <ul>/<li>; delete the four per-column
  link classes (year-index-item, cat-index-item, student-index-item,
  keyword-index-item); active state switches from .active to
  aria-current="page" on the <a>
- Add <h1 class="sr-only">Répertoire</h1> so the index view has a
  page-level heading (WCAG 2.4.6)
- Remove redundant <div class="search-results-view"> wrapper; padding
  moved to .results-grid and .search-results-header directly
- Replace <div class="results-grid"> with <ul class="results-grid">;
  each result card becomes <li><a class="result-card">
- Replace <span class="result-card__meta"> with <small> (ancillary
  metadata per HTML spec)
- Replace result-count <p> with <output role="status"> (computed value)
- Replace 3x <div class="search-filter-group"><label>…</label><select>
  with <label> directly wrapping <select> (implicit association,
  removes .search-filter-group divs); CSS updated to display:flex on
  the label itself
- Pagination wrapper changed to <nav aria-label="Pagination">;
  page-info span gets aria-current="page"
- search.css: delete .search-results-view, four index-item classes,
  .cat-index-group, .search-filter-group; consolidate years/other
  column link styles under .repertoire-col:first-child ul a and
  .repertoire-col:not(:first-child) ul a selectors; add ul reset rule
This commit is contained in:
Pontoporeia
2026-03-29 16:06:59 +02:00
parent 6657c4fbbe
commit c352a392a1
3 changed files with 85 additions and 105 deletions

View File

@@ -52,7 +52,7 @@
border-right: none;
}
.repertoire-col__header {
.repertoire-col > h2 {
font-size: 0.72rem;
letter-spacing: 0.1em;
text-transform: uppercase;
@@ -63,8 +63,15 @@
border-bottom: 1px solid var(--border-color);
}
/* Strip list chrome inside repertoire columns */
.repertoire-col ul {
list-style: none;
margin: 0;
padding: 0;
}
/* Years column - big bold numbers */
.year-index-item {
.repertoire-col:first-child ul a {
display: block;
font-size: 2.2rem;
font-weight: 700;
@@ -76,16 +83,12 @@
letter-spacing: -0.02em;
}
.year-index-item:hover,
.year-index-item.active {
.repertoire-col:first-child ul a:hover,
.repertoire-col:first-child ul a[aria-current] {
color: var(--purple);
}
/* Categories column */
.cat-index-group {
margin-bottom: 0.6rem;
}
.cat-index-label {
font-size: 0.72rem;
letter-spacing: 0.08em;
@@ -97,7 +100,8 @@
margin-top: 0.75rem;
}
.cat-index-item {
/* Categories, students, keywords columns — shared link style */
.repertoire-col:not(:first-child) ul a {
display: block;
font-size: 0.95rem;
color: var(--black);
@@ -107,57 +111,26 @@
transition: color 0.15s;
}
.cat-index-item:hover,
.cat-index-item.active {
color: var(--purple);
}
/* Students column */
.student-index-item {
display: block;
font-size: 0.95rem;
color: var(--black);
text-decoration: none;
padding: 0.1rem 0;
line-height: 1.4;
transition: color 0.15s;
}
.student-index-item:hover {
color: var(--purple);
}
/* Keywords column */
.keyword-index-item {
display: block;
font-size: 0.95rem;
color: var(--black);
text-decoration: none;
padding: 0.1rem 0;
line-height: 1.4;
transition: color 0.15s;
}
.keyword-index-item:hover,
.keyword-index-item.active {
.repertoire-col:not(:first-child) ul a:hover,
.repertoire-col:not(:first-child) ul a[aria-current] {
color: var(--purple);
}
/* ---- Search results view (grid) ---- */
.search-results-view {
padding: 1rem 1.5rem;
}
.search-results-header {
display: block;
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: 1rem;
margin: 1rem 1.5rem 0.5rem;
}
.results-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 1.5rem;
list-style: none;
margin: 0;
padding: 0.5rem 1.5rem 1.5rem;
}
.result-card {
@@ -187,6 +160,7 @@
.result-card__meta {
font-size: 0.78rem;
color: var(--purple);
font-style: normal;
}
/* Toggle button (index/results) */
@@ -229,18 +203,17 @@
flex-wrap: wrap;
}
.search-filter-group {
/* label now wraps the select directly — flex aligns label text + select */
.search-filter-label {
display: flex;
align-items: center;
gap: 0.4rem;
}
.search-filter-label {
font-size: 0.78rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
white-space: nowrap;
cursor: default;
}
.search-filter-select {