Skip to content

Conversation

@tomdavies73
Copy link
Contributor

@tomdavies73 tomdavies73 commented Feb 4, 2026

Proposed behaviour

Adds:

  1. de-DE
  2. fr-CA
  3. fr-FR
  4. pt-PR

Translations for info, error and warning states. es-ES will be added a later date, consumers are advised to use a local override if needed.

Current behaviour

Currently, only an en-GB translation is provided for info, error and warning states

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

The With Error And Warning stories should now have a correct accessible name which contains the tab title in every locale apart from spanish (es-ES).

  1. Navigate to the With Error And Warning story
  2. Turn on voiceOver
  3. Tab (pardon the pun) onto a Tab
  4. Assert that the accessible name is correct for the respective locale (swap locales using the locale dropdown at the top of story book)

Note: you can see the original translations in the attached JSON files on the parent ticket on JIRA (FE-7580)

Copy link
Contributor

@nuria1110 nuria1110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the english file needs updating too since it doesn't match the format of the new translations:

  tabs: {
    error: () => "contains errors",
    warning: () => "contains warnings",
    info: () => "contains information",
  },

Copy link
Contributor

@DipperTheDan DipperTheDan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to approve once @nuria1110 's comment has been adressed.

@tomdavies73 tomdavies73 force-pushed the FE-7584 branch 3 times, most recently from 08ea4c3 to 9b72af7 Compare February 6, 2026 14:43
}

if (Array.isArray(node)) {
return node.map(extractTextFromNode).join("");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion(non-blocking): If we have an array of React nodes like [<span>First</span>, <span>Second</span>], joining with an empty string produces "FirstSecond", but joining with a space produces "First Second", which is more likely what we want for accessible labels and generally reads better. I might just be thinking of an edge-case scenario though.

Suggested change
return node.map(extractTextFromNode).join("");
return node.map(extractTextFromNode).join(" ");

Copy link
Contributor

@DipperTheDan DipperTheDan Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just so we don't forget. This and the test file will need moving to a more suitable location than style/utils.

@tomdavies73 tomdavies73 merged commit bbe74e0 into master Feb 11, 2026
28 checks passed
@tomdavies73 tomdavies73 deleted the FE-7584 branch February 11, 2026 10:35
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 158.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants