doxa-maps/library/components/legends
doxa-maps-88655c70 a177f98aff
Some checks are pending
build-gate / build (push) Waiting to run
legend: the controls no longer read their own i18n key aloud
The legend's toggle button announced the literal string "aria.toggleLegend" to
screen readers. Not in translated locales only — in English too. vue-i18n echoes
the key when a lookup misses, and `toggleLegend` was absent from every catalog
while its two siblings in the same file, backToLegend and closeDetailView, were
present. Six call sites across LegendDesktop.vue and LegendMobile.vue, desktop
and mobile alike.

aria-label is the one string a sighted tester never sees. Every other
untranslated string in this tree got caught because somebody looked at the
screen; this one is only ever spoken aloud, so it survived every visual QA pass.

A second instance turned up in the same sweep with the opposite shape:
SemanticTreeLegend hardcoded 'Collapse legend' / 'Expand legend' into both title
and aria-label with no t() at all — correct English, and untranslatable. One key
missing FROM the catalog, one string never routed TO it.

Adds toggleLegend, collapseLegend and expandLegend to all 11 aria.json catalogs
and routes the hardcoded pair through t(). check:i18n-parity already guards them.

New gate smoke:aria-labels asserts BOTH shapes, because either assertion alone
is insufficient: "no raw keys" passes a hardcoded English label forever, and
"labels differ across locales" passes a raw key, since a key is identical in
every locale. It detects a raw key by SHAPE — dotted, camelCase, no spaces —
which is locale-independent and works on the Arabic and Chinese pages where no
English word list could.

Mutation-tested twice. Removing the catalog key fails with the raw key named, on
all four viewport/locale combinations. Hardcoding one label back to English
initially PASSED: the differ count dropped 6 to 5 and nothing asserted on it —
the same "a number printed but not asserted on is decoration" shape this tree
keeps rediscovering — so the gate gained a LOCALIZED_FLOOR ratchet and now fails
that too.

Verified the fix generalizes beyond the profile it was found on: country-posters
reports 182 of 190 accessible names localized, 0 raw keys. Rebuilds the six
bundles that embed a legend; check:sri confirms every leaf matches. Wave 34/34.
2026-09-24 13:16:18 +00:00
..
LegendDesktop.vue Search tier 2: a misspelled country resolves to THE country (best match, 2-edit cap) 2026-09-24 00:34:19 +00:00
LegendMobile.vue The map attribution is tappable: corner controls sit above the scroll-edge gutters 2026-09-16 23:17:58 -05:00
LegendProgressBar.vue Prayer legend: bar only in the header (no numbers); research map search pill matches the legend width; Mapbox attribution on every map 2026-09-16 20:16:04 -05:00
LegendRows.vue consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
LegendTools.vue Search bar off on MapLibre for country-posters, legend rises to fill it 2026-09-24 02:43:14 +00:00
SemanticTreeLegend.vue legend: the controls no longer read their own i18n key aloud 2026-09-24 13:16:18 +00:00