Repository navigation
Description
Summary
On /fr/… or /es-MX/…, everything a sighted visitor reads comes from the CMS and is translated. Everything only a screen reader consumes is a hardcoded English literal — 36 aria-label call sites and 5 screen-reader-only text nodes, 41 strings in all, in components that render on every locale.
#56 is the ticket that introduces the UI-string layer, and its scope enumerates visible copy only (nav labels, footer, page tags, meditation/lecture error copy). As written it will land and leave all 41 of these in English. This ticket is that gap, not a competing plan — fold it into #56 if you would rather have one.
Raised by the Wednesday analysis survey (ISO week 36, angle: accessibility).
Why it is worse than it sounds on the map page
pages/+lang.ts sets <html lang> from pageContext.locale, so a French page is correctly declared French — and a French screen reader then applies French phonetics to English words. On /fr/map, pages/map/_components/AtlasContent.tsx puts all of its structure in sr-only text: <h2>Meditation classes</h2> (line 115) and <dt>When</dt> / <dt>Where</dt> / <dt>Languages</dt> (168, 174, 180). Sighted visitors get that structure from the visual layout. For an AT user those five strings are the entire structure of the page, and they are all English.
Where they are
The 41 call sites, and the greps that produce them
20 string-literal aria-labels — grep -rn 'aria-label="' components layouts pages --include=*.tsx | grep -v stories | grep -v test, minus 5 matches that are JSDoc examples (Icon.tsx:59, Button.tsx:42,108,111, Tooltip.tsx:53):
MeditationPlayer.tsx:249,274 · ContentIndex.tsx:86 · ErrorFallback.tsx:73 · LocationSearch.tsx:240,246,268 · FormField.tsx:109 · Alert.tsx:94 · SocialShare.tsx:94,102 · AudioPlayer.tsx:158,177,187,212 · ContentCarousel.tsx:159,172 · EmbedButton.tsx:101 · Breadcrumbs.tsx:42 · AtlasContent.tsx:48
16 English strings inside aria-label={…} expressions — grep -rn 'aria-label={' … returns 24; 8 of those pass a caller-supplied prop through and are correct as they stand (ColumnCarousel.tsx:40, Icon.tsx:103, Button.tsx:308,325, Avatar.tsx:115, Spinner.tsx:108,122, LanguageFlag.tsx:67). The remaining 16 embed English:
SubtleSystem.tsx:300 ('Exit fullscreen'/'Enter fullscreen'), :326 (Learn more about ${…}) · MeditationPlayer.tsx:179,186,696 · RichText.tsx:248 · ContentCard.tsx:220 · SocialShare.tsx:110 · AudioPlayer.tsx:168,202 · HeroQuote.tsx:72 · TableOfContents.tsx:35 · ColumnCarousel.tsx:173 · MasonryGrid.tsx:84 · Image.tsx:347 · SocialIcon.tsx:96 (${label} (opens in new tab))
5 screen-reader-only text nodes — grep -rn 'className="sr-only"' …:
FormBuilder.tsx:438 (Submitting form, please wait…) · AtlasContent.tsx:115,168,174,180
Excluded as correct: Spinner.tsx:113,129, which render a {label} prop.
Approach
- Add an
a11ygroup to thewm-web-translationsshape feat(i18n): consume CMS wm-web-translations + BCP-47 locale codes #56 introduces, and route every call site above through the same accessor feat(i18n): consume CMS wm-web-translations + BCP-47 locale codes #56 gives the visible copy. - The 16 expression cases need interpolation, so whatever
t()-shaped helper feat(i18n): consume CMS wm-web-translations + BCP-47 locale codes #56 lands must take parameters (Learn more about {title},Go to column {n}: {title},Show {count} more items) rather than being a flat key→string map. This is the one thing worth deciding before feat(i18n): consume CMS wm-web-translations + BCP-47 locale codes #56 is implemented, because a flat map would have to be reworked. - Guard the regression: a unit test (node lane, per
docs/rules/testing.md) that grepscomponents/**andpages/**foraria-label="and for a literal text node underclassName="sr-only", and fails on any hit outside a JSDoc block. Aneslintrule works too; the test is cheaper and needs no plugin.
Blocked by: #56 — until the CMS translation layer exists there is no accessor to route these through, and adding a second local mechanism now would have to be unwound.
Acceptance criteria
- All 41 strings above resolve through the CMS translation layer, with English as the fallback locale.
- The accessor supports interpolated values, and the 16 expression call sites use it rather than composing English in JSX.
- A test fails on a new string-literal
aria-labelor a new literalsr-onlytext node incomponents/**orpages/**. -
/fr/maprenders itssr-onlyheading and definition terms in French.
Verification checklist
-
grep -rn 'aria-label="' components layouts pages --include=*.tsx | grep -v stories | grep -v testreturns only JSDoc example lines. -
curl -s http://localhost:5173/fr/map | grep -o 'sr-only[^<]*<[^>]*>[^<]*'shows French, notWhen/Where/Languages. -
pnpm lint && pnpm typecheck && pnpm test:runpass. - The new guard test fails when a literal
aria-label="Dismiss"is reintroduced incomponents/molecules/Alert/Alert.tsx, and passes once reverted.
Notes
- Searched for duplicates first:
search_issuesoverrepo:sydevs/WeMeditateWebforaccessibilityand fortranslate UI strings interface copy localization aria-label hardcoded Englishreturns nothing; the three open issues are feat(seo): describe /map from the atlas root, not the site defaults #64, feat(i18n): consume CMS wm-web-translations + BCP-47 locale codes #56 and docs(player): fix the stale html5 comment and verify seeking #13. - The blocker is recorded as the body line above only. No MCP tool reaches GitHub Relationships, so a cloud run cannot set the real dependency — please add it with
gh issue edit 71 --repo sydevs/WeMeditateWeb --add-blocked-by 56if you want it in the panel too. - The last verification item is the loop's own rule that a new assertion is not finished until it has failed (
docs/rules/testing.md); it applies to the guard test as much as to a regression spec.
🤖 Written by the sydevs autonomous loop — see what this is
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Activity
Ardnived commentedon Sep 2, 2026
@sydevs-bot Go ahead and fold this ticket into #56 , then close this ticket
sydevs-bot commentedon Sep 3, 2026
Folded into #56 and closing, as asked. Nothing was dropped — the inventory, the greps, the guard test and the
/fr/mapargument all moved across.One thing was promoted rather than copied, because it changes #56's design and would have been easy to lose at the bottom of a scope list:
That now sits in its own ⚠ subsection above #56's acceptance criteria, and the four criteria this ticket carried are appended to that list rather than living in a separate ticket that #56 could land without reading.
What moved where
<details>block under "Accessible names", with a note that the counts are a 2026-09-02 snapshot and should be re-run/fr/mapsr-onlyargument/fr/mapin French)a11ygroup in thewm-web-translationsshape#56's own scope, criteria and BCP-47 work are unchanged — this is additive.
The
Blocked by: #56line went with the ticket rather than into #56; there is no blocker left to record, since the work is now one ticket. #56 keeps its own dependency on sydevs/SahajCloud#528.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code