Changeset 1c6d61c in Klonkt for src/assets/css/style.css


Ignore:
Timestamp:
06/20/2026 08:19:11 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
cf0de0c
Parents:
4dcefa1
Message:

fix(nav): Timeline/Grid active state via aria-selected (htmx-robust)

Root cause: body-attribute CSS (body[data-feed-view]) does NOT react reliably
after an htmx OOB swap; element attributes do. Therefore the active Timeline/Grid
state is now via [aria-selected="true"] (set by syncAria, which fires on
htmx:afterSettle) instead of body[data-feed-view]. syncAria sets aria-selected
only on feed pages → on calendar/downloads/post both are grey. Template also
sets the initial aria-selected neutral on non-feed pages.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    r4dcefa1 r1c6d61c  
    21332133   Niet op de Archive-pagina: daar is geen "huidige" timeline/grid-keuze, dus beide
    21342134   knoppen blijven neutraal (grijs). */
    2135 body[data-feed-view="timeline"]:not(.on-archive):not(.on-shows):not(.on-downloads) .view-switch-btn[data-view="timeline"],
    2136 body[data-feed-view="grid"]:not(.on-archive):not(.on-shows):not(.on-downloads) .view-switch-btn[data-view="grid"] {
    2137     background: var(--ink);
    2138     color: var(--paper);
    2139     border-color: var(--ink);
    2140 }
     2135/* Actieve Tijdlijn/Grid-state wordt nu gestuurd via [aria-selected="true"] (gezet
     2136   door syncAria, die óók op htmx:afterSettle draait) i.p.v. body[data-feed-view].
     2137   Reden: body-class/attribuut-CSS pakte niet betrouwbaar na een htmx-OOB-swap;
     2138   een element-attribuut wel. De witte active-regel staat in shared-styles. */
    21412139.view-switch-btn .icon { width: 1rem; height: 1rem; }
    21422140
Note: See TracChangeset for help on using the changeset viewer.