Repository navigation
refactor(translations): no global declares a screen-reader-only string - #1246
Conversation
Screen-reader strings now live in the sites that render them, machine- translated there: WeMeditate Web's lib/i18n/a11y/ and Sahaj Atlas's src/config/a11y/. Both mount their own copy over anything this API still serves, so the CMS copies are dead weight for translators. - wm-web-translations drops its ten `a11y` sub-groups (60 keys). Generated DDL drops the twenty jsonb columns; the stored values go with them. - sy-atlas-translations drops thirteen keys only ever spoken. Their groups keep other keys, so a data-only migration sweeps them out of every locale and version row, guarded against a scalar column; down restores English. - The seeds, the generated types and the specs follow. SUBGROUP_PRESENTATION existed only to label and collapse `a11y`, so it goes too. - translations-no-a11y.spec.ts holds the boundary for all three globals. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uest Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🚅 Deployed to the SahajCloud-pr-1246 environment in sahajcloud
1 service not affected by this PR
|
… this PR blocks.live_session.a11y_next_session is a string only a screen reader speaks, and no translations global declares one any more (#1246): WeMeditate Web carries it as blocks.a11y.next_session in its own a11y files (sydevs/WeMeditateWeb#328). The schema, the seed, the copy migration and the generated types drop it; the other seven keys are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…his PR meditation.a11y.finder_region is a string only a screen reader speaks, and no translations global declares one any more (#1246): WeMeditate Web carries it in its own a11y files (sydevs/WeMeditateWeb#328). The schema, the seed, the copy migration and the generated types drop it; the visible finder keys are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size of the problem and no larger: exactly 69 wm-web paths under a11y and exactly the 13 atlas keys leave the schemas, nothing else removed and nothing added, with the same 13 gone from each of the ten atlas seed locales. The premise holds — all 13 trace to an aria-label, an srLabel, a closeLabel or an sr-only live region in SahajAtlasWeb. Both migrations follow src/globals/AGENTS.md's retirement rules. The boundary this PR declares is weaker than the body claims, and that is the one finding worth acting on.
The merge-order note understates one step: WeMeditateWeb#328 is based on claude/reorg-layout, not main, so its deploy waits on that branch first.
Findings
- should-fix — the new spec's screen-reader check matches a convention this same diff deletes, and never held
sy-atlas-translations.tests/unit/translations-no-a11y.spec.ts:50 - should-fix —
docs/rules/admin-ui.md:206still tells a reader a shorthand slug "needs its own label", with nothing left to give it one. - consider — the fourth hand copy of
dropKey/addKey, against open #1242.src/migrations/20261121_035100_atlas_drop_a11y_keys.ts:49
What was checked
- Schema key paths diffed as sets in both globals, and the ten seed diffs.
- Each of the 13 atlas keys at its call site on SahajAtlasWeb
main.search.results.showingreads as visible copy and is not —LoadMore.tsx:139puts it in ansr-onlyrole="status"region. - Migrations: all 8 atlas columns and their
version_twins present in the snapshot;upsweeps both tables and every version row,downrestores English on the main row andlatestonly. - Every path the body names exists on the branch; the preview link is
ON_HOST. new-pieces.mjsreturnedNONE, so no streamliner ran. Ladder walked by hand: nothing new added.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The new spec checks a description beginning "Not shown on screen", but the rule asking an author to write it left with the a11y groups, so nothing armed the check. The group-name check cannot see a spoken-only key under a group named for its view, which is the shape the atlas schema had, so the description check is the only one that catches it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVoonCEnRmLZif3QmR
The sentence told a reader a shorthand slug needs its own label, but the one override it pointed at went with the a11y groups. A caller taking a label still passes one; a translations sub-group takes none, so there the answer is to name the slug in words. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVoonCEnRmLZif3QmR
|
Addressed the critic's three threads. Pushed Adopted
Rebutted
Body — the ⚠ merge-order note now names WeMeditateWeb#328's base, sydevs/WeMeditateWeb#327, which its deploy waits on. No base merge needed. Lean gate green — lint, format, both typechecks, 3852 unit tests. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
sydevs-bot
left a comment
There was a problem hiding this comment.
Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ons-wisdom-sidetext #1246 retired this global's ten a11y sub-groups, so the seed's `_meta` prose and its quoted shape both moved under this branch. The conflict is `_meta` alone: main's wording is the true one — no a11y key is declared here any more — and the shape it quotes gains this branch's one key, 13 tabs, 13 leaf groups, 98 declared keys. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYqULZrbvhm9F3pwHY
#1246 retired every screen-reader-only group from `wm-web-translations`, and its migration drops those jsonb columns. This branch's own a11y key had already left it, so the two conflicts both resolve main's way: - `data.en.json` keeps main's deleted `meditation.a11y` group deleted and its `_meta.source` prose, plus this branch's four `meditation.general` finder keys. `schema_version` is re-derived on the merged schema. - `src/migrations/index.ts` takes main's two new entries; this branch's data-only migration writes `meditation_general` only, so it stays correct ahead of the a11y column drop. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVaqvGwKPitKiowTG8
…tdown-directory main's #1246 withdrew every `a11y` group from the three translations globals, so the four conflicts are all that collision with this branch's new `blocks.live_session` group. - `blocks.a11y` goes, `blocks.live_session` stays, in the schema's type, the seed file, the leaf-group spec and `src/payload-types.ts`. `pnpm generate:types` on the merged tree reproduces the hand resolution byte for byte. - The collapsible spec takes main's shape — every sub-group opens, since SUBGROUP_PRESENTATION is gone — but not its `toBe('General')`: `blocks` now carries a second sub-group, which is what the leaf-group set already pins. - `_meta.schema_version` is re-derived, not merged: 14 leaf groups and 104 declared keys, as `translations-seed-meta.spec.ts` computes them. - `src/migrations/index.ts` keeps both branches' migrations in timestamp order. 20261122_182623_merge_snapshot_heal_a11y_live_session heals the snapshot chain again. main's two a11y drops carry later timestamps than this branch's live-session migrations and their snapshots predate `blocks_live_session`, so `migrate:create` on the merged tree re-emitted both of 20261119_230234_wm_web_live_session_keys' ADD COLUMNs — the #566 boot abort. Its DDL is emptied and its snapshot kept, and a probe run now writes nothing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYK2WPg76HitzFZZHH
Merging origin/main brought #1246, which deletes every a11y leaf group from wm-web-translations. The spec seeded common.a11y, so its three table reads hit a column that no longer exists and all seven cases failed on the merged tree. common.general is the live sibling, and loading / show_more are both declared, so the seed stays a write additionalProperties: false accepts. Both guards were neutralised again on the new group and watched fail: the write path lost two cases, the delete path two. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWSq14etEawvvxGuCV
The atlas share block's Copy link is now a named button rather than a copy field, so its label is on-screen copy. #1246 retired `share.copy_link` as screen-reader-only and swept it from every locale; this declares it again, with its English as a schema default, so production fills it on boot. Co-authored-by: Claude Opus 5.5 <[email protected]>
⚠ Merge order: this goes first. sydevs/WeMeditateWeb#328 and sydevs/SahajAtlasWeb#456 follow, and neither carries code to set aside a SahajCloud copy: the server simply stops having these strings. Between this deploy and theirs, WeMeditate Web's
aria-labels read as key paths (media.a11y.play) — the new site is not public yet — and the atlas widget falls back to its bundled English for the 13 keys.Summary
wm-web-translationsdrops all tena11ysub-groups (60 keys), andsy-atlas-translationsdrops 13 keys that are only ever spoken. Both sites now own these strings and machine-translate them, so translators no longer see them, and adding one no longer needs a schema change, migration and contract sync here.tests/unit/translations-no-a11y.spec.tsholds that boundary for all three translations globals: noa11ygroup, and no key described as screen-reader-only.src/globals/AGENTS.mdasks for that description, since it is the only one of the two checks that sees a spoken-only key under a group named for its view — the shapesy-atlas-translationshad.docs/rules/admin-ui.mdno longer points a shorthand slug at the label override this diff removes.SUBGROUP_PRESENTATIONexisted only to labela11y"Accessibility" and start it collapsed, so it goes too.Change outline
Contract: the schemas, as each reader sees them
Flow: what an existing database gets
20261121_035055_wm_web_drop_a11y_groups generated DDL up DROP COLUMN <tab>_a11y, version_<tab>_a11y ×10 each down ADD COLUMN … jsonb (empty; values are not restored) 20261121_035100_atlas_drop_a11y_keys data only, snapshot re-stamped up for each of the 13 (column, key): both tables, every locale, every version row SET col = col - key WHERE jsonb_typeof(col) = 'object' AND col ? key down English back where absent: main en row + latest version rowThe atlas groups keep their other keys, so their columns stay and only the keys are swept out. That sweep is required: each group is
additionalProperties: false, so a key left behind in any row would refuse every later save of the global.Migration
src/migrations/20261121_035055_wm_web_drop_a11y_groups.{ts,json}(generated) andsrc/migrations/20261121_035100_atlas_drop_a11y_keys.{ts,json}(data only, whose.jsonis the first one's snapshot re-stamped).pnpm db:migrations:create probe --skip-empty < /dev/nullwrote no files after both.Contract impact
src/payload-types.tsloses thea11yinterfaces and the 13 atlas properties. The bot'scontractSyncPRs in both consumers pick that up, and neither consumer breaks: WeMeditate Web mounts its owna11ytype beside SahajCloud's, and every atlas key is optional insatisfies.Test results
.claude/skills/pr-prep/check.sh: lint, format, typecheck, typecheck:tests, and 3852 unit tests in 286 files.tests/int/translations-globals.int.spec.ts,tests/int/wm-web-translations-seed.int.spec.tsandseeds/tests/atlas-translations-import.test.ts, 52 passed.upthendownagainst a throwaway Postgres holding en/de main rows, two version rows and a scalar column.upremoved the keys from every row, kept their siblings and left the scalar alone.downrestored English on the mainenrow and thelatestversion row only.translations-no-a11y.spec.tsfails both checks againstmain's web schema.Manual verification
Notes for reviewer
blocks.live_session.a11y_next_session) and feat(translations): the meditation library's wording keys #1225 (meditation.a11y.finder_region). The web site now carries both keys.dropKey/addKeyand follows that issue's finding: thejsonb_typeofguard is the load-bearing one. refactor(migrations): settle one home for the English-key backfill SQL #1242's own decision keeps this copy: the helper lands unreferenced in refactor(migrations): settle one home for the English-key backfill SQL #1245, with the next such migration as its first consumer.🤖 Generated with Claude Code