Skip to content

Fix: translate the accessible names in Settings - #169

Merged
SandObserver merged 1 commit into
mainfrom
fix/translate-settings-accessible-names
Aug 29, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/translate-settings-accessible-names

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Point 20 hardcoded literals at the catalogue key that already carried the same English, rather than adding duplicates.
  • Drop the hardcoded aria-label from every inline-edit pencil and name the button in initInlineEdit from its row's .rl label, via a new common.editNamed message; this covers all 25 inline-edit rows and removes 14 separate strings.
  • Add 24 keys across common, app, folder, appearance, widgetCfg, nav, general, dashboard and about, translated into all six locales, for the labels and names that had no equivalent.
  • Replace the hardcoded row labels in the iframe widget form and the colour control with t() calls, so the pencil names derived from them are translated too.
  • Add data-i18n-title to translateDOM, alongside the existing text, html, placeholder and aria-label attributes.
  • Set the Settings document title from nav.pageTitle after initI18n.
  • Add hardcoded-strings.test.mjs, which fails on an aria-label, placeholder, title or row label holding a literal instead of a key, with a narrow allowlist for example values, brands and bare technical tokens.
  • Relax landmarks.test.mjs to match attributes rather than exact attribute order, matching the pattern the dashboard landmark test already uses.

Testing
All green: 1083 frontend tests, 1334 backend tests at 94.35% lines, lint, format, both typechecks, the cache-busting check, the admin ES-module syntax check, and the Docker build. Added 2 tests, the scan verified to fail by introducing a literal aria-label before reverting.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

About 55 user-facing strings in Settings were written straight into the source
rather than made catalogue keys. Most were accessible names, so a screen reader
in any language read a translated page and then spoke English for every
control. The reachability test could not see them: nothing was missing from a
catalogue, because the strings had never been keys.

Twenty of them already had a key that said the same thing and now reuse it.
Fourteen were "Edit <row label>" on an inline-edit pencil; those carry no name
of their own now, and initInlineEdit names the button after the row's own
label, so the two stay in one language and in step. The rest become 24 new
keys, translated into all six languages.

Static markup gains a data-i18n-title attribute, matching the existing text,
placeholder and aria-label attributes, and the Settings page title is set from
the catalogue.

A new test scans the interface source for a literal where a translated value
belongs, so this surface cannot grow back.
@SandObserver SandObserver added the ui/ux UI, UX, and accessibility only fix label Aug 29, 2026
@SandObserver
SandObserver merged commit 7c93701 into main Aug 29, 2026
4 checks passed
@SandObserver
SandObserver deleted the fix/translate-settings-accessible-names branch August 29, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui/ux UI, UX, and accessibility only fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant