Repository navigation
Description
Describe the Bug
Three admin elements pass a collection or field label to t() without resolving it with getTranslation. When the label is a locale record ({ en: 'Posts', sv: 'Inlägg' }, a supported labels / label shape), the interpolated text becomes [object Object]. The visible text next to each element is correct, because those sites do call getTranslation; only the accessible names (and the title tooltip on the dashboard button) are wrong, so screen-reader users hear [object Object].
- Dashboard collection card, plus button:
aria-labelandtitlereadCreate new [object Object].packages/ui/src/widgets/CollectionCards/index.tsx:109-111callst('general:createNewLabel', { label })with the raw label, while the card title in the same file (:124) usesgetTranslation(label, i18n). - List view sort buttons:
aria-labelreadsSort by [object Object] Ascending/Descending.packages/ui/src/elements/SortColumn/index.tsx:54-57and:65-68callt('general:sortByLabelDirection', { direction, label })with the raw field label (passed in fromproviders/TableColumns/buildColumnState). - Document drawer toggler (the add-new button beside a relationship field):
aria-labelreadsAdd new [object Object].packages/ui/src/elements/DocumentDrawer/index.tsx:48-50callst(operation === 'create' ? 'fields:addNewLabel' : 'general:editLabel', { label: collectionConfig?.labels.singular }); the edit branch has the same problem.
Expected: each accessible name contains the resolved label (Create new Posts, Sort by Title Ascending, Add new Post). A fix is to resolve with getTranslation(label, i18n) before the value reaches t() at the three sites.
Link to the code that reproduces this issue
Reproduction Steps
The repro is the blank layout with the Postgres adapter; posts has labels as { en, sv } records and a title field with label: { en: 'Title', sv: 'Titel' } in defaultColumns; comments has a relationship to posts. Start a Postgres 16, cp .env.example .env, pnpm install, pnpm dev, open http://localhost:3000/admin and create the first user.
- Dashboard
/admin: inspect the plus link on the Posts card.aria-label="Create new [object Object]",titlethe same. /admin/collections/posts: inspect the two sort buttons in the Title column header.aria-label="Sort by [object Object] Ascending"and"Sort by [object Object] Descending"./admin/collections/comments/create: inspect the add-new button beside thepostfield.aria-label="Add new [object Object]".
Switch the admin language to Swedish (Account > Language): the same three read Skapa ny [object Object], Sortera efter [object Object] Stigande and Lägg till ny [object Object]. Observed in a running admin (Chromium) on 3.92.1.
Which area(s) are affected?
area: ui
Environment Info
Binaries:
Node: 22.23.2
pnpm: 11.7.0
Relevant Packages:
payload: 3.92.1
next: 16.3.3
@payloadcms/db-postgres: 3.92.1
@payloadcms/richtext-lexical: 3.92.1
@payloadcms/translations: 3.92.1
@payloadcms/ui/shared: 3.92.1
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: linux
Arch: x64
Activity
fix: resolve config labels before interpolating them into strings (#1…
fix: resolve config labels before interpolating them into strings (#1…
github-actions commentedon Nov 4, 2026
🚀 This is included in version v3.93.0