Skip to content

Add i18n and accessibility CI checks - #1280

Merged
javuto merged 1 commit into
developfrom
i8n-ci-checks
Nov 29, 2026
Merged

javuto merged 1 commit into
developfrom
i8n-ci-checks

Conversation

@javuto

@javuto javuto commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Add i18n and accessibility CI checks

Summary

Adds automated pull-request checks for translation correctness, accessibility smoke coverage, and RTL layout behavior.

  • ICU parsing, placeholder, plural-category, and double-brace checks for every catalog.
  • axe accessibility smoke test for the login page.
  • Arabic RTL Playwright test that verifies document direction and horizontal layout.
  • New npm scripts and CI steps.

Closes #1272.

Motivation

The translation review found a real interpolation bug ({{date}} / {{user}} rendering literally) that existing key-parity and empty-string tests did not catch. There was also no automated accessibility or RTL coverage.

Changes

i18n checks

Extended frontend/src/i18n/i18n.test.ts with @formatjs/icu-messageformat-parser:

  • Every catalog must mirror the English key set.
  • Every value must be non-empty.
  • Every message must parse as valid ICU.
  • English argument names must be preserved exactly.
  • Every plural must include an other clause.
  • Every plural category must be valid for the target language.
  • Double-brace interpolations ({{name}}) are rejected.

This catches:

  • missing or renamed placeholders
  • malformed ICU
  • invalid plural categories
  • accidental English interpolation syntax
  • keys added to only some catalogs

Accessibility

Added frontend/src/features/login/LoginPage.a11y.test.tsx:

  • renders the login page with password + OIDC methods
  • runs axe-core
  • fails on serious or critical violations
  • disables document-level rules that do not apply to a page fragment

RTL layout

Added frontend/tests/e2e/rtl.spec.ts:

  • selects Arabic through localStorage
  • verifies html[dir="rtl"] and html[lang="ar"]
  • verifies the Arabic sign-in button is visible
  • checks the page does not overflow horizontally

This avoids committed screenshot baselines while still catching direction and layout regressions.

CI

Updated .github/workflows/frontend-build.yml to run:

npm run i18n:check
npm run a11y:check
npm test
npm run build

The existing Playwright job runs the new RTL spec automatically.

Documentation

Updated frontend/README.md with:

  • the new npm scripts
  • what the i18n checks enforce
  • what the accessibility and RTL checks cover

Dependencies

Added dev dependencies:

  • @formatjs/icu-messageformat-parser
  • axe-core

package-lock.json is updated.

Tests

  • npm run check — passed.
  • npm run i18n:check — 50 tests passed.
  • npm run a11y:check — passed.
  • npm test — 91 files, 898 tests passed.
  • npm run test:e2e — 3 tests passed, including the new RTL spec.

Follow-ups

  • Add a pseudo-locale build for broader layout stress testing.
  • Extend axe coverage beyond the login page to nodes, queries, alerts, and settings.
  • Optionally add visual RTL snapshots once a stable screenshot workflow and baseline policy exist.

@javuto javuto added cicd CICD related issues 🌍 i8n Internationalization related issues test Adding or changing tests labels Nov 29, 2026
@javuto
javuto merged commit e7d7bc2 into develop Nov 29, 2026
7 checks passed
@javuto
javuto deleted the i8n-ci-checks branch November 29, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd CICD related issues 🌍 i8n Internationalization related issues test Adding or changing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add i18n and accessibility CI checks

1 participant