signup: say what the anti-spam check is, in both languages #163

Stängd
öppnade 2026-08-02 12:30:26 +00:00 av supernaut · 0 kommentarer
Ägare

Why

The sign-up form shows a widget labelled "Anti-spam check" and nothing else. A visitor who has met
the usual third-party image puzzles has no way to know that this one is self-hosted, image-free and
does no tracking, which is a point in our favour that we are currently keeping to ourselves.

What to add

A permanent description inside the existing .captcha wrapper
(src/components/signup-form.astro:283-301), between the label paragraph and <cap-widget>:

  • EN: "The check stops automated sign-ups. Instead of a picture puzzle your browser solves a small
    calculation, a proof of work, which takes a few seconds. It runs on Bitborg's own servers in
    Sweden, sets no cookies and tracks nothing."
  • SV: "Kontrollen stoppar automatiska registreringar. I stället för ett bildpussel löser din
    webbläsare en liten beräkning, ett arbetsbevis (proof of work), vilket tar några sekunder. Den
    körs på Bitborgs egna servrar i Sverige, sätter inga cookies och spårar ingenting."

New key signup.captchaDescription in both dictionaries in src/i18n/ui.ts.

House term (operator decision): the Swedish term is "arbetsbevis (proof of work)" — the
Swedish word with the English in parentheses on first use, per the introduce-a-term rule. It is not
in the Forgejo sv-SE glossary, so add it to docs/content-style.md as part of this change so the
next writer does not have to re-decide it.

Also add a <noscript> line: the hidden cap-token field is created by the widget at runtime and
the solver is WebAssembly, so with JavaScript off sign-up cannot succeed at all — and today the
only way to find that out is to submit and be told the check failed.

  • EN: "The anti-spam check needs JavaScript. Turn it on to sign up, or contact us and we will help."
  • SV: "Antispam-kontrollen kräver JavaScript. Slå på det för att skapa ett konto, eller kontakta oss
    så hjälper vi dig."

Accessibility

  • Wire the description through aria-describedby on the wrapper <div class="captcha" role="group">, not on <cap-widget> — the custom element has no ARIA role of its own and its
    control lives in the shadow root.
  • Compose the ids the way the username field does (src/components/signup-form.astro:33-38) so the
    existing conditional error id is kept, not replaced.
  • The description id must be rendered unconditionally. #146 fixed an aria-describedby pointing at
    an id that did not exist; do not reintroduce that shape.
  • Not aria-live. It is static text; only the error notices announce themselves.
  • Apply to the re-issue form's widget as well (:166-183).

Done when

  • Both widgets carry a visible, localized description that is exposed as their accessible
    description.
  • pnpm lang-check passes and the copy has been read in both languages.

Part of gitborg/gitborg-docs#69.

## Why The sign-up form shows a widget labelled "Anti-spam check" and nothing else. A visitor who has met the usual third-party image puzzles has no way to know that this one is self-hosted, image-free and does no tracking, which is a point in our favour that we are currently keeping to ourselves. ## What to add A permanent description inside the existing `.captcha` wrapper (`src/components/signup-form.astro:283-301`), between the label paragraph and `<cap-widget>`: - EN: "The check stops automated sign-ups. Instead of a picture puzzle your browser solves a small calculation, a proof of work, which takes a few seconds. It runs on Bitborg's own servers in Sweden, sets no cookies and tracks nothing." - SV: "Kontrollen stoppar automatiska registreringar. I stället för ett bildpussel löser din webbläsare en liten beräkning, ett arbetsbevis (proof of work), vilket tar några sekunder. Den körs på Bitborgs egna servrar i Sverige, sätter inga cookies och spårar ingenting." New key `signup.captchaDescription` in both dictionaries in `src/i18n/ui.ts`. **House term (operator decision):** the Swedish term is **"arbetsbevis (proof of work)"** — the Swedish word with the English in parentheses on first use, per the introduce-a-term rule. It is not in the Forgejo `sv-SE` glossary, so add it to `docs/content-style.md` as part of this change so the next writer does not have to re-decide it. Also add a `<noscript>` line: the hidden `cap-token` field is created by the widget at runtime and the solver is WebAssembly, so with JavaScript off sign-up cannot succeed at all — and today the only way to find that out is to submit and be told the check failed. - EN: "The anti-spam check needs JavaScript. Turn it on to sign up, or contact us and we will help." - SV: "Antispam-kontrollen kräver JavaScript. Slå på det för att skapa ett konto, eller kontakta oss så hjälper vi dig." ## Accessibility - Wire the description through `aria-describedby` on the wrapper `<div class="captcha" role="group">`, not on `<cap-widget>` — the custom element has no ARIA role of its own and its control lives in the shadow root. - Compose the ids the way the username field does (`src/components/signup-form.astro:33-38`) so the existing conditional error id is kept, not replaced. - The description id must be rendered unconditionally. #146 fixed an `aria-describedby` pointing at an id that did not exist; do not reintroduce that shape. - Not `aria-live`. It is static text; only the error notices announce themselves. - Apply to the re-issue form's widget as well (`:166-183`). ## Done when - Both widgets carry a visible, localized description that is exposed as their accessible description. - `pnpm lang-check` passes and the copy has been read in both languages. Part of gitborg/gitborg-docs#69.
supernaut lade till detta till projektet Bitborg Web 2026-08-02 12:34:28 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web#163
Ingen beskrivning angiven.