Skip to content

fix(i18n): localize toast accessibility labels - #9588

Open
bulunote wants to merge 1 commit into
makeplane:previewfrom
bulunote:agent/i18n-toast-accessibility
Open

fix(i18n): localize toast accessibility labels#9588
bulunote wants to merge 1 commit into
makeplane:previewfrom
bulunote:agent/i18n-toast-accessibility

Conversation

@bulunote

@bulunote bulunote commented Aug 12, 2026

Copy link
Copy Markdown

Description

The shared Propel toast component does not provide locale-aware accessible names for its notification viewport or close control. As a result, assistive technology can receive no explicit label or an English library default even when the active Plane language is not English.

This PR localizes those hidden accessibility labels by:

  • adding @plane/i18n as an explicit Propel dependency;
  • setting the toast viewport label with the existing notifications translation key;
  • setting each close control label with the existing close translation key; and
  • adding a focused regression test that protects the translated labels and package dependency.

No new translation keys are introduced. The existing keys are already translated across all supported locales, including 通知 / 关闭 for Simplified Chinese and 通知 / 關閉 for Traditional Chinese.

This PR intentionally covers only toast accessibility text. Other visible localization surfaces are being kept in separate reviewable changes.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

There is no visual change. The resulting accessible markup uses the active locale:

<BaseToast.Viewport aria-label={t("notifications")} />
<BaseToast.Close aria-label={t("close")} />

Test Scenarios

  • Regression test: node --test --experimental-strip-types packages/i18n/scripts/__tests__/toast-accessibility-localization.test.ts
  • pnpm turbo run build --filter=@plane/propel...
    • 6/6 build tasks completed successfully.
  • tsc --noEmit -p packages/propel/tsconfig.json
  • Changed-file OxLint with --deny-warnings
  • Changed-file oxfmt check
  • pnpm --filter @plane/i18n check:sync
    • all 19 locales contain the same 3,837 keys.
  • git diff --check

References

Summary by CodeRabbit

  • Accessibility

    • Added localized accessibility labels for toast notifications and their close buttons.
    • Toast labels now use the app’s existing translations for a more consistent experience across supported languages.
  • Tests

    • Added coverage to verify translated toast labels and localization support.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a0efca37-f75e-4e3c-8ec1-cfd4e9ccf485

📥 Commits

Reviewing files that changed from the base of the PR and between 1c8a60f and 9e4e977.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • packages/i18n/scripts/__tests__/toast-accessibility-localization.test.ts
  • packages/propel/package.json
  • packages/propel/src/toast/toast.tsx

📝 Walkthrough

Walkthrough

Toast accessibility labels now use existing i18n translations. The Propel package declares @plane/i18n as a runtime dependency. A repository test verifies the implementation and dependency declaration.

Changes

Toast accessibility localization

Layer / File(s) Summary
Localized toast labels
packages/propel/src/toast/toast.tsx, packages/propel/package.json
The toast viewport and close button now receive translated aria-label values. @plane/i18n is added as a workspace dependency.
Localization implementation test
packages/i18n/scripts/__tests__/toast-accessibility-localization.test.ts
The test verifies translation usage for notification and close labels and checks the workspace dependency declaration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: sriramveeraghanta

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description includes the required sections, explains the change, identifies the bug fix, documents tests, and states that no screenshots apply.
Title check ✅ Passed The title clearly and concisely identifies the main change: localizing toast accessibility labels for internationalization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CLAassistant

CLAassistant commented Aug 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bulunote
bulunote marked this pull request as ready for review August 12, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants