web: the topics-remove field gets a label, and a test that would have caught it !254

merged merged by cmc on 2026-09-05 00:02 UTC · krz/gitbay:sonar-a11y-config into main

Discussion

cmc

Stacked on !253. Last of the #153 fixes.

A placeholder is not an accessible name — it disappears on focus and a screen reader need not announce it. topics-remove had only a placeholder while the add field beside it had both id and label. #133 fixed this class across the templates and missed this one.

TestEveryInputHasAnAccessibleName is the guard that was absent. It reads template source, since the rule is a property of the markup and holds whatever data a page is given. Confirmed load-bearing by removing the new label and watching it name the field.

Worth noting how the test nearly became the bug: its first draft knew only for/id association and reported six further violations in new.html and register.html. I looked at the markup instead of believing the count — all six use the implicit form, <label>Name <input></label>, which is equally valid. Had I "fixed" them, I'd have churned six correct templates on my own false positive.

Also excludes internal/store/migrations/** from analysis rather than dismissing the same false positive after every migration: they are SQLite read as PL/SQL, where '' is NULL, so WHERE col = '' on a NOT NULL DEFAULT '' column reads as a null-comparison bug.

Ref #153

retargeted from sonar-cookie-attrs to main: !253 merged

2026-09-05 00:02 UTC