mnw-server: fix discover filter aria state and header affordances
The filter sidebar's htmx:beforeRequest handler toggled only the
is-selected class, so the server-rendered aria-selected went stale on the
first click and then inverted: the selected item reported false while the
deselected "All" still reported true. These are role=option in a
role=listbox, so assistive tech reads the attribute rather than the class
and the listbox announced the opposite of the screen. Set the attribute
alongside the class.
The column headers were gated on mode but never on view, so the default
grid view rendered a five-column table header above a card grid, labelling
nothing. Toggle them from applyView, which also covers the htmx:afterSwap
re-apply so the header cannot drift out of sync after a filter swap.
The headers also carried cursor: pointer plus a hover response while
nothing bound them, inviting a click that did nothing. Sorting exists via
the sort select, which made the invitation more plausible. Both rules were
global, so feed.html's equally unsortable headers are fixed too.
Found and verified in a real browser against testnot.work.
Co-Authored-By
Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-16 15:01 UTC